* Minify stream, add stream stuff to releases again * Kill off a lot of tech debt, drop internal utilities from npm 1. Kill `module/`, internalize `bundler/`, privatize `test-utils/` We've been telling people to move elsewhere from these for a while, and it's about time we just pull the plug here and finally remove them. - We officially removed the bundler from the public API in v2.0, and that was the only one of these that was ever publicly documented. Usage should be low enough by now it shouldn't break anyone- I'm not seeing bundler bugs being reported anymore, either. - The `module/` utility was so narrow and caveat-filled that I'm not sure anyone really used it (even us core Mithril devs never really used it), and we only had it documented in the repo folder it lived in. I think only one bug was ever filed, and it's because it somehow ended up completely non-functional without any of us realizing it. - The test utilities were meant to be internal from day 1, but people started using it despite us core developers constantly telling people to look elsewhere and even the docs recommending specific alternatives without mention of our internal mocks. (Now if people would RTFM, that'd be nice...) 2. Add dedicated HTML test files to verify ospec and the promise polyfill, and ensure the promise tests are in pure ES5. These are made specially for those and should be much easier to just run now. 3. Fix the benchmark script to use the real DOM in browsers and to not require as many dependencies to create. Also, tweak them to be much more effective and precise on what's being tested. Previously, it was rendering to the HTML file itself, while now it's rendering to the `body`. This means in browsers, it's triggering layout and everything, benchmarking how well Mithril optimizes for style and layout recalcs, too. It also puts some pressure on the hyperscript parser attribute application, so that can be noticed as well. * Update dependencies
98 lines
3.4 KiB
YAML
98 lines
3.4 KiB
YAML
sudo: false
|
|
|
|
# Only care about running tests against latest node
|
|
language: node_js
|
|
node_js:
|
|
- node
|
|
|
|
# Keep node_modules around, it speeds up builds & they don't change often
|
|
cache:
|
|
directories:
|
|
- node_modules
|
|
|
|
# Custom install step so the travis-only stuff doesn't need to be in package.json
|
|
install:
|
|
- npm install
|
|
# This is to prevent lint-staged/prettier from running on the bundles
|
|
- npm rm husky
|
|
|
|
# Run tests, lint, and then check for perf regressions
|
|
script:
|
|
- npm test
|
|
- npm run perf
|
|
|
|
# After a successful build commit changes back to repo
|
|
# Disable per https://github.com/MithrilJS/mithril.js/issues/2417
|
|
# after_success:
|
|
# - |
|
|
# # Set up SSH environment
|
|
# $(npm bin)/set-up-ssh \
|
|
# --key "$encrypted_016049456622_key" \
|
|
# --iv "$encrypted_016049456622_iv" \
|
|
# --path-encrypted-key "./.deploy.enc"
|
|
#
|
|
# # Commit bundle changes generated in before_script step
|
|
# # --commands is a weird no-op but required for commit-changes to run
|
|
# # --branch arg is to ensure this only runs against the `next` branch
|
|
# $(npm bin)/commit-changes \
|
|
# --commands "echo committing" \
|
|
# --commit-message "Bundled output for commit $TRAVIS_COMMIT [skip ci]" \
|
|
# --branch "next"
|
|
#
|
|
# # Only want to commit docs when building pushes on master &
|
|
# # this doesn't have the built-in branch protection like commit-changes
|
|
# if [ "$TRAVIS_EVENT_TYPE" == "push" ] && \
|
|
# [ "$TRAVIS_BRANCH" == "master" ] && \
|
|
# [ "$TRAVIS_REPO_SLUG" == "MithrilJS/mithril.js" ]
|
|
# then
|
|
# # Generate docs
|
|
# npm run gendocs
|
|
#
|
|
# # Set up git env
|
|
# git config --global user.email "$GH_USER_EMAIL"
|
|
# git config --global user.name "$GH_USER_NAME"
|
|
#
|
|
# # Commit docs to gh-pages branch
|
|
# # Using --add to ensure that archived versions aren't lost
|
|
# # Using --repo to force it to go over SSH so the saved keys are used (tschaub/gh-pages#160)
|
|
# $(npm bin)/gh-pages \
|
|
# --dist ./dist \
|
|
# --add \
|
|
# --repo "git@github.com:MithrilJS/mithril.js.git" \
|
|
# --message "Generated docs for commit $TRAVIS_COMMIT [skip ci]"
|
|
# else
|
|
# echo "Not submitting documentation updates"
|
|
# fi
|
|
|
|
# Environment configuration
|
|
env:
|
|
global:
|
|
# Set up GH_USER_EMAIL & GH_USER_NAME env variables used by travis-scripts package
|
|
- secure: UdSk2uKTL56iOHkIZP9Tpj/OI8w26DRTs6INRq+peZKkHq8NVC0TmbtbpRoc5kxErovN2hyqsAnoMtXSQHKK+H9mpMx0v4ck/I+o2oEny/1hwi5YQ/Q0nAebVhZkgA3eVhJY1brK0bOlr8uI07m9mcPs3Qz0ramZutJQG7FdnZs=
|
|
|
|
# Deploy to npm and github pages on tagged commits that successfully build
|
|
deploy:
|
|
- provider: releases
|
|
api_key:
|
|
secure: BBlVwr3CRWS6Zmc8nsYMMN59P95g/lg9OzNCsP7uiFyu7mnC6VdOIgwmmJXBviUiEymbcdepgRqEdjHIoemg2YhM5IOnhMoYFrfMBoWUpMihpejFY8EVm3NrTh0prXgCHbp/3OktoKdOn/Zhc2z7cKDMeToHzaDStLtQPR8u9jU=
|
|
file:
|
|
- "mithril.js"
|
|
- "mithril.min.js"
|
|
- "stream/stream.js"
|
|
- "stream/stream.min.js"
|
|
skip_cleanup: true
|
|
draft: true
|
|
on:
|
|
tags: true
|
|
repo: MithrilJS/mithril.js
|
|
|
|
# Skip until I can figure out what's going on with docs + version deployment
|
|
# - provider: npm
|
|
# skip_cleanup: true
|
|
# email: me@isiahmeadows.com
|
|
# api_key:
|
|
# secure: "uPLbeJTalA/b38srb1VuWnD3eOgeKTkXf8VVUasUXIqc2xub4DSkFm1IVKSVd/rzP7EeO7+gRUs2UteNKlpZJl226IS5mFPSVtC7ViW46WSpYT0wlMsc7hrubMBGTx3/XYpPwtmMlTIGs5ICT7YkGAuju/6i79LDAB+gbnEY8Bc="
|
|
# on:
|
|
# tags: true
|
|
# repo: MithrilJS/mithril.js
|
|
# condition: "$TRAVIS_TAG != *-*"
|