|
| 1 | +# Contributing to normalize.css |
| 2 | + |
| 3 | +Please take a moment to review this document in order to make the contribution |
| 4 | +process easy and effective for everyone involved. |
| 5 | + |
| 6 | +Following these guidelines helps to communicate that you respect the time of |
| 7 | +the developers managing and developing this open source project. In return, |
| 8 | +they should reciprocate that respect in addressing your issue or assessing |
| 9 | +patches and features. |
| 10 | + |
| 11 | + |
| 12 | +## Using the issue tracker |
| 13 | + |
| 14 | +The issue tracker is the preferred channel for [bug reports](#bugs), |
| 15 | +[features requests](#features) and [submitting pull |
| 16 | +requests](#pull-requests), but please respect the following restrictions: |
| 17 | + |
| 18 | +* Please **do not** use the issue tracker for personal support requests. |
| 19 | + |
| 20 | +* Please **do not** derail or troll issues. Keep the discussion on topic and |
| 21 | + respect the opinions of others. |
| 22 | + |
| 23 | + |
| 24 | +<a name="bugs"></a> |
| 25 | +## Bug reports |
| 26 | + |
| 27 | +A bug is a _demonstrable problem_ that is caused by the code in the repository. |
| 28 | +Good bug reports are extremely helpful - thank you! |
| 29 | + |
| 30 | +Guidelines for bug reports: |
| 31 | + |
| 32 | +1. **Use the GitHub issue search** – check if the issue has already been |
| 33 | + reported. |
| 34 | + |
| 35 | +2. **Check if the issue has been fixed** – try to reproduce it using the |
| 36 | + latest `master` branch in the repository. |
| 37 | + |
| 38 | +3. **Isolate the problem** – create a live example (e.g., on |
| 39 | + [Codepen](http://codepen.io)) of a [reduced test |
| 40 | + case](http://css-tricks.com/6263-reduced-test-cases/). |
| 41 | + |
| 42 | +A good bug report shouldn't leave others needing to chase you up for more |
| 43 | +information. Please try to be as detailed as possible in your report. What is |
| 44 | +your environment? What steps will reproduce the issue? What browser(s) and OS |
| 45 | +experience the problem? What would you expect to be the outcome? All these |
| 46 | +details will help people to fix any potential bugs. |
| 47 | + |
| 48 | +Example: |
| 49 | + |
| 50 | +> Short and descriptive example bug report title |
| 51 | +> |
| 52 | +> A summary of the issue and the browser/OS environment in which it occurs. If |
| 53 | +> suitable, include the steps required to reproduce the bug. |
| 54 | +> |
| 55 | +> 1. This is the first step |
| 56 | +> 2. This is the second step |
| 57 | +> 3. Further steps, etc. |
| 58 | +> |
| 59 | +> `<url>` - a link to the reduced test case |
| 60 | +> |
| 61 | +> Any other information you want to share that is relevant to the issue being |
| 62 | +> reported. This might include the lines of code that you have identified as |
| 63 | +> causing the bug, and potential solutions (and your opinions on their |
| 64 | +> merits). |
| 65 | +
|
| 66 | + |
| 67 | +<a name="features"></a> |
| 68 | +## Feature requests |
| 69 | + |
| 70 | +Feature requests are welcome. But take a moment to find out whether your idea |
| 71 | +fits with the scope and aims of the project. It's up to *you* to make a strong |
| 72 | +case to convince the project's developers of the merits of this feature. Please |
| 73 | +provide as much detail and context as possible. |
| 74 | + |
| 75 | + |
| 76 | +<a name="pull-requests"></a> |
| 77 | +## Pull requests |
| 78 | + |
| 79 | +Good pull requests - patches, improvements, new features - are a fantastic |
| 80 | +help. They should remain focused in scope and avoid containing unrelated |
| 81 | +commits. |
| 82 | + |
| 83 | +**Please ask first** before embarking on any significant work, otherwise you |
| 84 | +risk spending a lot of time working on something that the project's developers |
| 85 | +might not want to merge into the project. |
| 86 | + |
| 87 | +Please adhere to the coding conventions used throughout a project (whitespace, |
| 88 | +accurate comments, etc.) and any other requirements (such as test coverage). |
| 89 | + |
| 90 | +Follow this process if you'd like your work considered for inclusion in the |
| 91 | + |
| 92 | +1. [Fork](http://help.github.com/fork-a-repo/) the project, clone your fork, |
| 93 | + and configure the remotes: |
| 94 | + |
| 95 | + ```bash |
| 96 | + # Clone your fork of the repo into the current directory |
| 97 | + git clone https://github.com/<your-username>/normalize.css |
| 98 | + # Navigate to the newly cloned directory |
| 99 | + cd normalize.css |
| 100 | + # Assign the original repo to a remote called "upstream" |
| 101 | + git remote add upstream https://github.com/necolas/normalize.css |
| 102 | + ``` |
| 103 | + |
| 104 | +2. If you cloned a while ago, get the latest changes from upstream: |
| 105 | + |
| 106 | + ```bash |
| 107 | + git checkout master |
| 108 | + git pull upstream master |
| 109 | + ``` |
| 110 | + |
| 111 | +3. Never work directly on `master`. Create a new topic branch (off the latest |
| 112 | + version of `master`) to contain your feature, change, or fix: |
| 113 | + |
| 114 | + ```bash |
| 115 | + git checkout -b <topic-branch-name> |
| 116 | + ``` |
| 117 | + |
| 118 | +4. Commit your changes in logical chunks. Please adhere to these [git commit |
| 119 | + message conventions](http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html) |
| 120 | + or your code is unlikely be merged into the main project. Use Git's |
| 121 | + [interactive rebase](https://help.github.com/articles/interactive-rebase) |
| 122 | + feature to tidy up your commits before making them public. |
| 123 | + |
| 124 | + Make sure to add a test to the `test.html` file if appropriate, and test |
| 125 | + your change in all supported browsers. |
| 126 | + |
| 127 | +5. Locally rebase the upstream development branch into your topic branch: |
| 128 | + |
| 129 | + ```bash |
| 130 | + git pull --rebase upstream master |
| 131 | + ``` |
| 132 | + |
| 133 | +6. Push your topic branch up to your fork: |
| 134 | + |
| 135 | + ```bash |
| 136 | + git push origin <topic-branch-name> |
| 137 | + ``` |
| 138 | + |
| 139 | +10. [Open a Pull Request](https://help.github.com/articles/using-pull-requests/) |
| 140 | + with a clear title and description. |
| 141 | + |
| 142 | + Please submit a separate pull request for any appropriate changes required |
| 143 | + in the `v1` branch for legacy browsers. |
| 144 | + |
| 145 | +**IMPORTANT**: By submitting a patch, you agree to allow the project owner to |
| 146 | +license your work under the same license as that used by the project. |
| 147 | + |
| 148 | + |
| 149 | +<a name="maintainers"></a> |
| 150 | +## Maintainers |
| 151 | + |
| 152 | +If you have commit access, please follow this process for merging patches and |
| 153 | +cutting new releases. |
| 154 | + |
| 155 | +### Accepting patches |
| 156 | + |
| 157 | +1. Check that a patch is within the scope and philosophy of the project. |
| 158 | +2. Check that a patch has any necessary tests and a proper, descriptive commit |
| 159 | + message. |
| 160 | +3. Test the patch locally. |
| 161 | +4. Do not use GitHub's merge button. Apply the patch to `master` locally |
| 162 | + (either via `git am` or by checking the whole branch out). Amend minor |
| 163 | + problems with the author's original commit if necessary. Then push to GitHub. |
| 164 | +5. If a patch should be included in `v1`, cherry-pick the commits or manually |
| 165 | + apply if all else fails. |
| 166 | + |
| 167 | +### Releasing a new version |
| 168 | + |
| 169 | +1. Include all new functional changes in the CHANGELOG. |
| 170 | +2. Use a dedicated commit to increment the version. The version needs to be |
| 171 | + added to the CHANGELOG (inc. date), and edited in the README, |
| 172 | + `component.json`, and `normalize.css` files. |
| 173 | +3. The commit message must be of `v0.0.0` format. |
| 174 | +4. Create an annotated tag for the version: `git tag -m v0.0.0`. |
| 175 | +5. Push the changes and tags to GitHub: `git push --tags origin master` |
| 176 | +6. Checkout the `gh-pages` branch and follow the instructions in the README. |
0 commit comments