1565f670 by Brandon Casey Committed by Jon-Carlos Rivera

update CONTRIBUTING to be relevant to npm build scripts (#703)

1 parent a8688b56
1 # Contributing 1 # CONTRIBUTING
2 2
3 ## Important notes 3 We welcome contributions from everyone!
4 Please don't edit files in the `dist` subdirectory as they are generated via Grunt. You'll find source code in the `src` subdirectory!
5 4
6 ### Code style 5 ## Getting Started
7 Regarding code style like indentation and whitespace, **follow the conventions you see used in the source already.**
8 6
9 ### PhantomJS 7 Make sure you have NodeJS 0.10 or higher and npm installed.
10 While Grunt can run the included unit tests via [PhantomJS](http://phantomjs.org/), this shouldn't be considered a substitute for the real thing. Please be sure to test the `test/*.html` unit test file(s) in _actual_ browsers.
11 8
12 ## Modifying the code 9 1. Fork this repository and clone your fork
13 First, ensure that you have the latest [Node.js](http://nodejs.org/) and [npm](http://npmjs.org/) installed. 10 1. Install dependencies: `npm install`
11 1. Run a development server: `npm start`
14 12
15 Test that Grunt's CLI is installed by running `grunt --version`. If the command isn't found, run `npm install -g grunt-cli`. For more information about installing Grunt, see the [getting started guide](http://gruntjs.com/getting-started). 13 ### Making Changes
16 14
17 1. Fork and clone the repo. 15 Refer to the [video.js plugin standards][standards] for more detail on best practices and tooling for video.js plugin authorship.
18 1. Run `npm install` to install all dependencies (including Grunt).
19 1. Run `grunt` to grunt this project.
20 16
21 Assuming that you don't see any red, you're ready to go. Just be sure to run `grunt` after making any changes, to ensure that nothing is broken. 17 When you've made your changes, push your commit(s) to your fork and issue a pull request against the original repository.
22 18
23 ## Submitting pull requests 19 ### Running Tests
20
21 Testing is a crucial part of any software project. For all but the most trivial changes (typos, etc) test cases are expected. Tests are run in actual browsers using [Karma][karma].
22
23 - In all available and supported browsers: `npm test`
24 - In a specific browser: `npm run test:chrome`, `npm run test:firefox`, etc.
25 - While development server is running (`npm start`), navigate to [`http://localhost:9999/test/`][local]
26
27
28 [karma]: http://karma-runner.github.io/
29 [local]: http://localhost:9999/test/
30 [standards]: https://github.com/videojs/generator-videojs-plugin/docs/standards.md
24 31
25 1. Create a new branch, please don't work in your `master` branch directly.
26 1. Add failing tests for the change you want to make. Run `grunt` to see the tests fail.
27 1. Fix stuff.
28 1. Run `grunt` to see if the tests pass. Repeat steps 2-4 until done.
29 1. Open `test/*.html` unit test file(s) in actual browser to ensure tests pass everywhere.
30 1. Update the documentation to reflect any changes.
31 1. Push to your fork and submit a pull request.
......