- Fork web-animations/web-animations-js.
git clone [email protected]:$GITHUB_USER/web-animations-js.git
git submodule update --init --recursive
(Necessary for running tests.)- Install node and make sure
npm
is in your $PATH - Run
npm install
in the respository to pull in development dependencies. - Run
npm install -g grunt-cli
to get the build tools for the command line.
Note that development should occur against the dev
branch, not master
. This
is the default target for pull requests.
- In your fork of web-animations-js,
git checkout dev
or create a new branch whose parent is dev. - Run
grunt
to build the polyfill. - Run
grunt test
to run polyfill and web-platform-tests tests. - Commit changes to your fork.
- Create a pull request from your fork of web-animations-js to web-animations/web-animations-js/dev.
- Ensure that you've signed the Google Contributor License Agreement.
You can run the tests in an interactive mode with grunt debug
. This starts the
Karma server once for each polyfill target for each test framework.
Navigate to http://localhost:9876/debug.html
to open the test runner in your
browser of choice, all test results appear in the Javascript console.
Test failures can be accessed via window.failures
and window.formattedFailures
once the tests have completed.
The polyfill target and tests can be specified as arguments to the debug
task.
Example: grunt debug:web-animations-next:test/web-platform-tests/web-animations/animation/pause.html
Multiple test files may be listed with comma separation. Specifying files will output their URL in the command line.
Example: http://localhost:9876/base/test/web-platform-tests/web-animations/animation/pause.html
-
Clone a fresh copy of web-animations-js.
-
Make sure you are on the
dev
branch.git checkout dev
-
Determine the version number for the release
- Increment the first number and reset others to 0 when there are large breaking changes
- Increment the second number and reset the third to 0 when there are significant new, but backwards compatible features
- Otherwise, increment the third number
-
Add versioned release notes to
History.md
, for example:### 3.13.37 — *November 1, 2001* * Fixed a bug where nothing worked
Use the following to generate a summary of commits, but edit the list to contain only relevant information.
git log --first-parent `git describe --tags --abbrev=0 master`..dev --pretty=format:" * %s"
-
Specify the new version inside
package.json
(for NPM), for example:"version": "3.13.37",
-
Build the polyfill with
npm install && grunt
then updatedocs/experimental.md
's Build Target Comparison with the current gzipped sizes. -
Commit and push the above changes to web-animations-js/dev.
# Create a commit with above changes git push origin dev
-
Merge to local master branch:
git checkout master git merge dev --no-edit --quiet
-
Build and commit minified JavaScript files.
npm install grunt # Optional "grunt test" to make sure everything still passes. git add -f *.min.js{,.map} git rm --ignore-unmatch .gitignore git commit -m 'Add build artifacts from '`cat .git/refs/heads/dev` git push origin master
-
Draft a new release.
- For the tag version, put the new version number of this release.
- For the target, select "master".
- For the title, look at previous releases for examples.
- For the description, copy the release notes from
History.md
added in step #2.
-
Once you've pushed to web-animations-js, run
npm publish
from that checked-out folderTo do this, you'll need to be a collaborator on the NPM project, or have a collaborator help you.
-
If there are any breaking changes to the API in this release you must notify [email protected].
Only owners of the group may post to it so you may need to request ownership or ask someone to post it for you.
This is an overview of what happens when grunt test
is run.
- Polyfill tests written in mocha and chai are run.
- grunt creates a karma config with mocha and chai adapters.
- grunt adds the test/js files as includes to the karma config.
- grunt starts the karma server with the config and waits for the result.
- The mocha adaptor runs the included tests and reports the results to karma.
- karma outputs results to the console and returns the final pass/fail result to grunt.
- web-platform-tests/web-animations tests written in testtharness.js are run.
- grunt creates a karma config with karma-testharness-adaptor.js included.
- grunt adds the web-platform-tests/web-animations files to the custom testharnessTests config in the karma config.
- grunt adds failure expectations to the custom testharnessTests config in the karma config.
- grunt starts the karma server with the config and waits for the result.
- The testharness.js adaptor runs the included tests (ignoring expected failures) and reports the results to karma.
- karma outputs results to the console and returns the final pass/fail result to grunt.
- grunt exits successfully if both test runs passed.