|
| 1 | +# Contributing to jade |
| 2 | + |
| 3 | +### Step 1: Fork |
| 4 | + |
| 5 | +Fork the project [on GitHub](https://github.com/jadejs/jade) and check out your |
| 6 | +copy locally. |
| 7 | + |
| 8 | +```text |
| 9 | +$ git clone [email protected]:username/jade.git |
| 10 | +$ cd jade |
| 11 | +$ git remote add upstream git://github.com/jadejs/jade.git |
| 12 | +``` |
| 13 | + |
| 14 | +#### Which branch? |
| 15 | + |
| 16 | +For developing new features and bug fixes, the `master` branch should be pulled |
| 17 | +and built upon. |
| 18 | + |
| 19 | +### Step 2: Branch |
| 20 | + |
| 21 | +Create a feature branch and start hacking: |
| 22 | + |
| 23 | +```text |
| 24 | +$ git checkout -b my-feature-branch -t origin/master |
| 25 | +``` |
| 26 | + |
| 27 | +### Step 3: Commit |
| 28 | + |
| 29 | +Make sure git knows your name and email address: |
| 30 | + |
| 31 | +```text |
| 32 | +$ git config --global user.name "J. Random User" |
| 33 | +$ git config --global user.email "[email protected]" |
| 34 | +``` |
| 35 | + |
| 36 | +### Step 4: Rebase |
| 37 | + |
| 38 | +Use `git rebase` (not `git merge`) to sync your work from time to time. |
| 39 | + |
| 40 | +```text |
| 41 | +$ git fetch upstream |
| 42 | +$ git rebase upstream/master |
| 43 | +``` |
| 44 | + |
| 45 | +### Step 5: Test |
| 46 | + |
| 47 | +Bug fixes and features **should come with tests**. Add your tests in the |
| 48 | +test/ directory. Look at other tests to see how they should be |
| 49 | +structured (license boilerplate, common includes, etc.). |
| 50 | + |
| 51 | +```text |
| 52 | +$ npm test |
| 53 | +``` |
| 54 | + |
| 55 | +Make sure that all tests pass. Please, do not submit patches that fail. |
| 56 | + |
| 57 | + |
| 58 | +### Step 6: Push |
| 59 | + |
| 60 | +```text |
| 61 | +$ git push origin my-feature-branch |
| 62 | +``` |
| 63 | + |
| 64 | +Go to https://github.com/yourusername/jades and select your feature branch. |
| 65 | +Click the 'Pull Request' button and fill out the form. |
| 66 | + |
| 67 | +Pull requests are usually reviewed within a few days. If there are comments |
| 68 | +to address, apply your changes in a separate commit and push that to your |
| 69 | +feature branch. Post a comment in the pull request afterwards; GitHub does |
| 70 | +not send out notifications when you add commits. |
| 71 | + |
| 72 | + |
| 73 | +## Developer's Certificate of Origin 1.0 |
| 74 | + |
| 75 | +By making a contribution to this project, I certify that: |
| 76 | + |
| 77 | +* (a) The contribution was created in whole or in part by me and I |
| 78 | + have the right to submit it under the open source license indicated |
| 79 | + in the file; or |
| 80 | +* (b) The contribution is based upon previous work that, to the best |
| 81 | + of my knowledge, is covered under an appropriate open source license |
| 82 | + and I have the right under that license to submit that work with |
| 83 | + modifications, whether created in whole or in part by me, under the |
| 84 | + same open source license (unless I am permitted to submit under a |
| 85 | + different license), as indicated in the file; or |
| 86 | +* (c) The contribution was provided directly to me by some other |
| 87 | + person who certified (a), (b) or (c) and I have not modified it. |
| 88 | + |
| 89 | + |
| 90 | +## Code of Conduct |
| 91 | + |
| 92 | +This Code of Conduct is adapted from [Rust's wonderful |
| 93 | +CoC](http://www.rust-lang.org/conduct.html). |
| 94 | + |
| 95 | +* We are committed to providing a friendly, safe and welcoming |
| 96 | + environment for all, regardless of gender, sexual orientation, |
| 97 | + disability, ethnicity, religion, or similar personal characteristic. |
| 98 | +* Please avoid using overtly sexual nicknames or other nicknames that |
| 99 | + might detract from a friendly, safe and welcoming environment for |
| 100 | + all. |
| 101 | +* Please be kind and courteous. There's no need to be mean or rude. |
| 102 | +* Respect that people have differences of opinion and that every |
| 103 | + design or implementation choice carries a trade-off and numerous |
| 104 | + costs. There is seldom a right answer. |
| 105 | +* Please keep unstructured critique to a minimum. If you have solid |
| 106 | + ideas you want to experiment with, make a fork and see how it works. |
| 107 | +* We will exclude you from interaction if you insult, demean or harass |
| 108 | + anyone. That is not welcome behaviour. We interpret the term |
| 109 | + "harassment" as including the definition in the [Citizen Code of |
| 110 | + Conduct](http://citizencodeofconduct.org/); if you have any lack of |
| 111 | + clarity about what might be included in that concept, please read |
| 112 | + their definition. In particular, we don't tolerate behavior that |
| 113 | + excludes people in socially marginalized groups. |
| 114 | +* Private harassment is also unacceptable. No matter who you are, if |
| 115 | + you feel you have been or are being harassed or made uncomfortable |
| 116 | + by a community member, please contact one of the channel ops or any |
| 117 | + of the TC members immediately with a capture (log, photo, email) of |
| 118 | + the harassment if possible. Whether you're a regular contributor or |
| 119 | + a newcomer, we care about making this community a safe place for you |
| 120 | + and we've got your back. |
| 121 | +* Likewise any spamming, trolling, flaming, baiting or other |
| 122 | + attention-stealing behaviour is not welcome. |
| 123 | +* Avoid the use of personal pronouns in code comments or |
| 124 | + documentation. There is no need to address persons when explaining |
| 125 | + code (e.g. "When the developer") |
0 commit comments