0
0
Fork 0
mirror of https://github.com/liabru/matter-js.git synced 2024-11-23 09:26:51 -05:00
liabru-matter-js/CONTRIBUTING.md

51 lines
1.7 KiB
Markdown
Raw Normal View History

2017-05-08 19:46:03 -04:00
# Contributing
## License Agreement
2019-09-14 14:37:22 -04:00
By providing any kind of contribution to this project, **you must agree and be legally entitled** to provide them for use and distribution as a part of this project **wholly under the same terms as in the original included [license](https://github.com/liabru/matter-js/blob/master/LICENSE)**.
## Contributions
2020-11-24 18:26:20 -05:00
Contributions by pull request or issues are welcome. Please ensure they follow the same style and architecture as the rest of the code. Use `npm run lint` and see [Testing](#Testing) below before submitting. Please **do not include** any changes to the files in the `build` directory.
2019-09-14 14:37:22 -04:00
Before contributing please read the license agreement described at the beginning of this document.
2017-05-08 19:46:03 -04:00
## Building
2014-05-10 11:13:49 -04:00
2019-09-14 14:37:22 -04:00
To build you must first install [node.js](http://nodejs.org), then run
2014-05-10 11:13:49 -04:00
npm install
2019-09-14 14:37:22 -04:00
which will install the required build dependencies, then run
2014-05-10 11:13:49 -04:00
2019-09-14 14:37:22 -04:00
npm run dev
2014-05-10 11:13:49 -04:00
which will run the development server and opens `http://localhost:8000/` in your browser. Any changes you make to the source will automatically rebuild and reload the page.
2017-05-08 19:46:03 -04:00
2020-11-24 18:26:20 -05:00
## Testing
All contributions should pass when running the commands
- `npm run lint`
- `npm run test`
- `npm run test-browser`
The output of `npm run test` also includes a [comparison report](https://github.com/liabru/matter-js/pull/794), which highlights changes in results, performance and accuracy against the last release build.
2019-09-14 14:37:22 -04:00
## Commands
2014-05-10 11:13:49 -04:00
2019-09-14 14:37:22 -04:00
The following development commands can be run at the terminal
2014-05-10 11:15:18 -04:00
2019-09-14 14:37:22 -04:00
- **npm run dev**
runs development server
- **npm run build**
creates a release build
- **npm run lint**
runs the linter
- **npm run test**
2020-11-24 18:26:20 -05:00
runs the tests and compares results
- **npm run test-browser**
runs the browser tests
2019-09-14 14:37:22 -04:00
- **npm run doc**
builds the documentation