OLD | NEW |
1 ## Developer setup instructions | 1 ## Developer instructions |
2 | 2 |
3 1. `git clone git@github.com:web-animations/web-animations-next.git` | 3 ### Setup |
| 4 |
| 5 1. Fork web-animations/web-animations-js. |
| 6 1. `git clone git@github.com:$GITHUB_USER/web-animations-js.git` |
4 1. `git submodule update --init --recursive` (Necessary for running tests.) | 7 1. `git submodule update --init --recursive` (Necessary for running tests.) |
5 1. Install [node](https://nodejs.org/en/) and make sure `npm` is in your $PATH | 8 1. Install [node](https://nodejs.org/en/) and make sure `npm` is in your $PATH |
6 1. Run `npm install` in the respository to pull in development dependencies. | 9 1. Run `npm install` in the respository to pull in development dependencies. |
7 1. Run `npm install -g grunt grunt-cli` to get the build tools for the command l
ine. | 10 1. Run `npm install -g grunt-cli` to get the build tools for the command line. |
| 11 |
| 12 ### Contributing |
| 13 |
| 14 Note that development should occur against the `dev` branch, not `master`. This |
| 15 is the default target for pull requests. |
| 16 |
| 17 1. In your fork of web-animations-js, `git checkout dev` or create a new branch
whose parent is dev. |
8 1. Run `grunt` to build the polyfill. | 18 1. Run `grunt` to build the polyfill. |
9 1. Run `grunt test` to run polyfill and web-platform-tests tests. | 19 1. Run `grunt test` to run polyfill and web-platform-tests tests. |
| 20 1. Commit changes to your fork. |
| 21 1. Create a pull request from your fork of web-animations-js to |
| 22 [web-animations/web-animations-js/dev](https://github.com/web-animations/web-
animations-js/tree/dev). |
10 | 23 |
11 | 24 |
12 ## Debugging tests | 25 ## Debugging tests |
13 | 26 |
14 You can run the tests in an interactive mode with `grunt debug`. This starts the | 27 You can run the tests in an interactive mode with `grunt debug`. This starts the |
15 Karma server once for each polyfill target for each test framework. | 28 Karma server once for each polyfill target for each test framework. |
16 Navigate to `http://localhost:9876/debug.html` to open the test runner in your | 29 Navigate to `http://localhost:9876/debug.html` to open the test runner in your |
17 browser of choice, all test results appear in the Javascript console. | 30 browser of choice, all test results appear in the Javascript console. |
18 Test failures can be accessed via `window.failures` and `window.formattedFailure
s` | 31 Test failures can be accessed via `window.failures` and `window.formattedFailure
s` |
19 once the tests have completed. | 32 once the tests have completed. |
20 | 33 |
21 The polyfill target and tests can be specified as arguments to the `debug` task.
| 34 The polyfill target and tests can be specified as arguments to the `debug` task. |
22 Example: `grunt debug:web-animations-next:test/web-platform-tests/web-animations
/animation/pause.html` | 35 Example: `grunt debug:web-animations-next:test/web-platform-tests/web-animations
/animation/pause.html` |
23 Multiple test files may be listed with comma separation. Specifying files will o
utput their URL in the command line. | 36 Multiple test files may be listed with comma separation. Specifying files will o
utput their URL in the command line. |
24 Example: `http://localhost:9876/base/test/web-platform-tests/web-animations/anim
ation/pause.html` | 37 Example: `http://localhost:9876/base/test/web-platform-tests/web-animations/anim
ation/pause.html` |
25 | 38 |
26 | 39 |
27 ## Design notes | 40 ## Design notes |
28 | 41 |
29 [Design diagrams](https://drive.google.com/folderview?id=0B9rpPoIDv3vTNlZxOVp6a2
tNa1E&usp=sharing) | 42 [Design diagrams](https://drive.google.com/folderview?id=0B9rpPoIDv3vTNlZxOVp6a2
tNa1E&usp=sharing) |
30 | 43 |
31 | 44 |
32 ## Publishing a release | 45 ## Publishing a release |
33 | 46 |
34 1. Determine the version number for the release | 47 1. Determine the version number for the release |
35 | 48 |
36 * Increment the first number and reset others to 0 when there are large brea
king changes | 49 * Increment the first number and reset others to 0 when there are large brea
king changes |
37 * Increment the second number and reset the third to 0 when there are signif
icant new, but backwards compatible features | 50 * Increment the second number and reset the third to 0 when there are signif
icant new, but backwards compatible features |
38 * Otherwise, increment the third number | 51 * Otherwise, increment the third number |
39 | 52 |
40 1. Add versioned release notes to `History.md`, for example: | 53 1. Add versioned release notes to `History.md`, for example: |
41 | 54 |
42 ### 3.13.37 — *November 1, 2001* | 55 ### 3.13.37 — *November 1, 2001* |
43 | 56 |
44 * Fixed a bug where nothing worked | 57 * Fixed a bug where nothing worked |
45 | 58 |
46 Use the following to generate a summary of commits, but edit the list to con
tain only | 59 Use the following to generate a summary of commits, but edit the list to con
tain only |
47 relevant information. | 60 relevant information. |
48 | 61 |
49 git log --first-parent `git describe --tags --abbrev=0 web-animations-js
/master`..web-animations-next/master --pretty=format:" * %s" | 62 git log --first-parent `git describe --tags --abbrev=0 master`..dev --pr
etty=format:" * %s" |
50 | 63 |
51 1. Specify the new version inside `package.json` (for NPM), for example: | 64 1. Specify the new version inside `package.json` (for NPM), for example: |
52 | 65 |
53 ```js | 66 ```js |
54 "version": "3.13.37", | 67 "version": "3.13.37", |
55 ``` | 68 ``` |
56 | 69 |
57 1. Build the polyfill with `npm install && grunt` then update `README.md`'s Bui
ld Target Comparison with the current gzipped sizes. | 70 1. Build the polyfill with `npm install && grunt` then update `docs/experimenta
l.md`'s Build Target Comparison with the current gzipped sizes. |
58 | 71 |
59 1. Submit both changes to web-animations-next then follow the procedure to push
from web-animations-next to web-animations-js. | 72 1. Commit the above changes to web-animations-js/dev and merge to |
| 73 web-animations-js/master. |
| 74 |
| 75 ```sh |
| 76 git checkout master |
| 77 git merge dev --no-edit --quiet |
| 78 ``` |
| 79 |
| 80 1. Build and commit minified JavaScript files. |
| 81 |
| 82 ```sh |
| 83 npm install |
| 84 grunt |
| 85 # Optional "grunt test" to make sure everything still passes. |
| 86 git add -f *.min.js* |
| 87 git rm .gitignore |
| 88 git commit -m 'Add build artifacts from '`cat .git/refs/heads/dev` |
| 89 git push HEAD:refs/heads/master |
| 90 ``` |
60 | 91 |
61 1. Draft a [new release](https://github.com/web-animations/web-animations-js/re
leases) at the | 92 1. Draft a [new release](https://github.com/web-animations/web-animations-js/re
leases) at the |
62 commit pushed to web-animations-js in step #4. Copy the release notes from `
History.md` | 93 commit pushed to web-animations-js in step #4. Copy the release notes from `
History.md` |
63 added in step #2. | 94 added in step #2. |
64 | 95 |
65 1. Once you've pushed to web-animations-js, run `npm publish` from that checked-
out folder | 96 1. Once you've pushed to web-animations-js, run `npm publish` from that checked-
out folder |
66 | 97 |
67 To do this, you'll need to be a collaborator [on the NPM project](https://www
.npmjs.com/package/web-animations-js), or have a collaborator help you. | 98 To do this, you'll need to be a collaborator [on the NPM project](https://www
.npmjs.com/package/web-animations-js), or have a collaborator help you. |
68 | 99 |
69 1. If there are any breaking changes to the API in this release you must notify
web-animations-changes@googlegroups.com. | 100 1. If there are any breaking changes to the API in this release you must notify
web-animations-changes@googlegroups.com. |
70 | 101 |
71 Only owners of the group may post to it so you may need to request ownership
or ask someone to post it for you. | 102 Only owners of the group may post to it so you may need to request ownership
or ask someone to post it for you. |
72 | 103 |
73 ## Pushing from web-animations-next to web-animations-js | |
74 | |
75 git fetch web-animations-next | |
76 git fetch web-animations-js | |
77 git checkout web-animations-js/master | |
78 git merge web-animations-next/master --no-edit --quiet | |
79 npm install | |
80 grunt | |
81 # Optional "grunt test" to make sure everything still passes. | |
82 git add -f *.min.js* | |
83 git rm .gitignore | |
84 git commit -m 'Add build artifacts from '`cat .git/refs/remotes/web-animatio
ns-next/master` | |
85 git push web-animations-js HEAD:refs/heads/master | |
86 | |
87 ## Testing architecture | 104 ## Testing architecture |
88 | 105 |
89 This is an overview of what happens when `grunt test` is run. | 106 This is an overview of what happens when `grunt test` is run. |
90 | 107 |
91 1. Polyfill tests written in mocha and chai are run. | 108 1. Polyfill tests written in mocha and chai are run. |
92 1. grunt creates a karma config with mocha and chai adapters. | 109 1. grunt creates a karma config with mocha and chai adapters. |
93 1. grunt adds the test/js files as includes to the karma config. | 110 1. grunt adds the test/js files as includes to the karma config. |
94 1. grunt starts the karma server with the config and waits for the result. | 111 1. grunt starts the karma server with the config and waits for the result. |
95 1. The mocha adaptor runs the included tests and reports the results to karm
a. | 112 1. The mocha adaptor runs the included tests and reports the results to karm
a. |
96 1. karma outputs results to the console and returns the final pass/fail resu
lt to grunt. | 113 1. karma outputs results to the console and returns the final pass/fail resu
lt to grunt. |
97 1. web-platform-tests/web-animations tests written in testtharness.js are run. | 114 1. web-platform-tests/web-animations tests written in testtharness.js are run. |
98 1. grunt creates a karma config with karma-testharness-adaptor.js included. | 115 1. grunt creates a karma config with karma-testharness-adaptor.js included. |
99 1. grunt adds the web-platform-tests/web-animations files to the custom test
harnessTests config in the karma config. | 116 1. grunt adds the web-platform-tests/web-animations files to the custom test
harnessTests config in the karma config. |
100 1. grunt adds failure expectations to the custom testharnessTests config in
the karma config. | 117 1. grunt adds failure expectations to the custom testharnessTests config in
the karma config. |
101 1. grunt starts the karma server with the config and waits for the result. | 118 1. grunt starts the karma server with the config and waits for the result. |
102 1. The testharness.js adaptor runs the included tests (ignoring expected fai
lures) and reports the results to karma. | 119 1. The testharness.js adaptor runs the included tests (ignoring expected fai
lures) and reports the results to karma. |
103 1. karma outputs results to the console and returns the final pass/fail resu
lt to grunt. | 120 1. karma outputs results to the console and returns the final pass/fail resu
lt to grunt. |
104 1. grunt exits successfully if both test runs passed. | 121 1. grunt exits successfully if both test runs passed. |
105 | 122 |
OLD | NEW |