UNPKG

3.74 kBMarkdownView Raw
1# Contributing to Ravel
2
3## Rules
4
5- PR everything. Commits made directly to master are prohibited, except under specific circumstances
6- Use feature branches. **Create an issue for every single feature or bug** and **label** it. If you are a core contributor, create a branch named feature/[issue #] to resolve the issue. If you are not a core contributor, fork and branch.
7- Try to label issues and PRs as accurately as possible, especially in the case of PRs, where `semver-major`, `semver-minor` and `semver-patch` labels are available. Labels on issues should be a subset of the labels on the corresponding pull request; the milestones should match.
8- Use github "Fixes #[issue]" syntax on your PRs to indicate which issues you are attempting to resolve
9- Keep Ravel small. If some piece of functionality can fit in a separate `ravel-*` module, then it probably should
10- Code coverage should strictly be enforced at 100%
11- Please follow the JavaScript coding style exemplified by existing source files and enforced by Ravel's `.eslintrc.json` configuration.
12
13## Sign-off your Commits
14
15We encourage contributors to "sign-off" on their commits:
16
17```bash
18$ git commit -s -m "Some commit message"
19```
20
21This will append the following to your commit message:
22
23```
24Signed-off-by: Your Name <your@email.com>
25```
26
27This sign-off certifies that you have the rights to submit your work under the [MIT license](https://opensource.org/licenses/MIT) and that you agree to the [Developer Certificate of Origin](http://developercertificate.org/):
28
29```
30Developer Certificate of Origin
31Version 1.1
32
33Copyright (C) 2004, 2006 The Linux Foundation and its contributors.
341 Letterman Drive
35Suite D4700
36San Francisco, CA, 94129
37
38Everyone is permitted to copy and distribute verbatim copies of this
39license document, but changing it is not allowed.
40
41
42Developer's Certificate of Origin 1.1
43
44By making a contribution to this project, I certify that:
45
46(a) The contribution was created in whole or in part by me and I
47 have the right to submit it under the open source license
48 indicated in the file; or
49
50(b) The contribution is based upon previous work that, to the best
51 of my knowledge, is covered under an appropriate open source
52 license and I have the right under that license to submit that
53 work with modifications, whether created in whole or in part
54 by me, under the same open source license (unless I am
55 permitted to submit under a different license), as indicated
56 in the file; or
57
58(c) The contribution was provided directly to me by some other
59 person who certified (a), (b) or (c) and I have not modified
60 it.
61
62(d) I understand and agree that this project and the contribution
63 are public and that a record of the contribution (including all
64 personal information I submit with it, including my sign-off) is
65 maintained indefinitely and may be redistributed consistent with
66 this project or the open source license(s) involved.
67```
68
69### Quick Tip
70
71If you wish to sign-off all commits against this repository automatically, use this command:
72
73```bash
74$ git config alias.cs 'commit -s'
75```
76
77## Developing and Testing
78
79### Linting and Testing
80To test (with code coverage):
81
82```bash
83$ npm test
84```
85
86Due to a [bug in istanbul](https://github.com/gotwarlost/istanbul/issues/274), failing tests will report incorrect line numbers. For this situation, use `test-no-cov`, which will omit code coverage reporting and give you accurate line numbers.
87
88```bash
89$ npm run test-no-cov
90```
91
92### Debugging
93
94To debug via `node debug`:
95
96```bash
97$ npm run debug
98```
99
100To debug via a remote debugger (of your choice):
101```bash
102$ npm run debug-remote
103```
104
105### Documentation (`mr-doc`)
106
107To build the docs:
108
109```bash
110$ npm run docs
111```