|
| 1 | +# How to contribute |
| 2 | + |
| 3 | +It is essential to the development of pixi.js that the community is empowered |
| 4 | +to make changes and get them into the library. Here are some guidlines to make |
| 5 | +that process silky smooth for all involved. |
| 6 | + |
| 7 | +## Reporting issues |
| 8 | + |
| 9 | +To report a bug, request a feature, or even ask a question, make use of the GitHub Issues |
| 10 | +section for [pixi.js][0]. When submitting an issue please take the following steps: |
| 11 | + |
| 12 | +1. **Seach for existing issues.** Your question or bug may have already been answered or fixed, |
| 13 | +be sure to search the issues first before putting in a duplicate issue. |
| 14 | + |
| 15 | +2. **Create an isolated and reproducible test case.** If you are reporting a bug, make sure you |
| 16 | +also have a minimal, runnable, code example that reproduces the problem you have. |
| 17 | + |
| 18 | +3. **Include a live example.** After narrowing your code down to only the problem areas, make use |
| 19 | +of [jsFiddle][1], [jsBin][2], or a link to your live site so that we can view a live example of the problem. |
| 20 | + |
| 21 | +4. **Share as much information as possible.** Include browser version affected, your OS, version of |
| 22 | +the library, steps to reproduce, etc. "X isn't working!!!1!" will probably just be closed. |
| 23 | + |
| 24 | + |
| 25 | +## Making Changes |
| 26 | + |
| 27 | +To setup for making changes you will need node.js, and grunt installed. You can download node.js |
| 28 | +from [nodejs.org][3]. After it has been installed open a console and run `npm i -g grunt-cli` to |
| 29 | +install the global `grunt` executable. |
| 30 | + |
| 31 | +After that you can clone the pixi.js repository, and run `npm i` inside the cloned folder. |
| 32 | +This will install dependencies necessary for building the project. Once that is ready, make your |
| 33 | +changes and submit a Pull Request. When submitting a PR follow these guidlines: |
| 34 | + |
| 35 | +- **Send Pull Requests to the `dev` branch.** All Pull Requests must be sent to the `dev` branch, |
| 36 | +`master` is the latest release and PRs to that branch will be closed. |
| 37 | + |
| 38 | +- **Ensure changes are jshint validated.** After making a change be sure to run the build process |
| 39 | +to ensure that you didn't break anything. You can do this with `grunt && grunt test` which will run |
| 40 | +jshint, rebuild, then run the test suite. |
| 41 | + |
| 42 | +- **Never commit new builds.** When making a code change, you should always run `grunt` which will |
| 43 | +rebuild the project, *however* please do not commit these new builds or your PR will be closed. |
| 44 | + |
| 45 | +- **Only commit relevant changes.** Don't include changes that are not directly relevant to the fix |
| 46 | +you are making. The more focused a PR is, the faster it will get attention and be merged. Extra files |
| 47 | +changing only whitespace or trash files will likely get your PR closed. |
| 48 | + |
| 49 | +## Quickie Code Style Guide |
| 50 | + |
| 51 | +- Use 4 spaces for tabs, never tab characters. |
| 52 | + |
| 53 | +- No trailing whitespace, blank lines should have no whitespace. |
| 54 | + |
| 55 | +- Always favor strict equals `===` unless you *need* to use type coercion. |
| 56 | + |
| 57 | +- Follow conventions already in the code, and listen to jshint. |
| 58 | + |
| 59 | +[0]: https://github.com/GoodBoyDigital/pixi.js/issues |
| 60 | +[1]: http://jsfiddle.net |
| 61 | +[2]: http://jsbin.com/ |
| 62 | +[3]: http://nodejs.org |
0 commit comments