|
| 1 | +# Contributing to knopf.css |
| 2 | + |
| 3 | +Please review this document in order to make the contribution process easy and |
| 4 | +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 project. In return, we will |
| 8 | +reciprocate that respect in addressing your issues, patches, and features. |
| 9 | + |
| 10 | +## Using the issue tracker |
| 11 | + |
| 12 | +The issue tracker is the preferred channel for [bug reports](#bug-reports), |
| 13 | +[feature requests](#feature-requests) and [pull |
| 14 | +requests](#pull-requests), but please respect the following restrictions: |
| 15 | + |
| 16 | +* Please **do not** use the issue tracker for personal support requests. |
| 17 | +* Please **do not** derail or troll issues. Keep the discussion on topic and |
| 18 | + respect the opinions of others. |
| 19 | + |
| 20 | +## Bug reports |
| 21 | + |
| 22 | +A bug is a _demonstrable problem_ caused by the code in this repository. |
| 23 | + |
| 24 | +1. **Use the GitHub issue search** to see if the issue has |
| 25 | + [already been reported]. |
| 26 | + |
| 27 | +2. **Check if the issue has been fixed** by trying to reproduce it using the |
| 28 | + latest `master` branch in the repository. |
| 29 | + |
| 30 | +3. **Isolate the problem** to create a [live example] of a [reduced test case]. |
| 31 | + |
| 32 | +A good bug report shouldn’t leave others needing to chase you up for more |
| 33 | +information. Please be as detailed as possible in your report. What is your |
| 34 | +environment? What steps will reproduce the issue? What browser(s) and OS |
| 35 | +experience the problem? What would you expect to be the outcome? All these |
| 36 | +details will help people to fix any potential bugs. |
| 37 | + |
| 38 | +Example: |
| 39 | + |
| 40 | +> Short and descriptive example bug report title |
| 41 | +> |
| 42 | +> A summary of the issue and the browser/OS environment in which it occurs. If |
| 43 | +> suitable, include the steps required to reproduce the bug. |
| 44 | +> |
| 45 | +> 1. This is the first step |
| 46 | +> 2. This is the second step |
| 47 | +> 3. Further steps, etc. |
| 48 | +> |
| 49 | +> `<url>` - a link to the reduced test case |
| 50 | +> |
| 51 | +> Any other information you want to share that is relevant to the issue being |
| 52 | +> reported. This might include the lines of code that you have identified as |
| 53 | +> causing the bug, and potential solutions (and your opinions on their |
| 54 | +> merits). |
| 55 | +
|
| 56 | +## Feature requests |
| 57 | + |
| 58 | +Feature requests are welcome. Take a moment to find out whether your idea fits |
| 59 | +with the scope and aims of the project. It’s up to *you* to make a strong case |
| 60 | +to convince the project’s developers of the merits of this feature. Please |
| 61 | +provide as much detail and context as possible. |
| 62 | + |
| 63 | +## Pull requests |
| 64 | + |
| 65 | +Good pull requests - patches, improvements, new features - are a fantastic |
| 66 | +help. They should remain focused in scope and avoid containing unrelated |
| 67 | +commits. |
| 68 | + |
| 69 | +**Please ask first** before embarking on any significant work, otherwise you |
| 70 | +risk spending a lot of time working on something that the project’s developers |
| 71 | +might not want to merge into the project. |
| 72 | + |
| 73 | +Please adhere to the coding conventions used throughout a project (whitespace, |
| 74 | +accurate comments, etc.) and any other requirements (such as test coverage). |
| 75 | + |
| 76 | +Follow this process if you’d like your work considered for inclusion in the |
| 77 | +project: |
| 78 | + |
| 79 | +1. To begin: [fork this project], clone your fork, and add our upstream. |
| 80 | + ```bash |
| 81 | + # Clone your fork of the repo into the current directory |
| 82 | + git clone git@github.com:YOUR_USER/knopf.css.git |
| 83 | + |
| 84 | + # Navigate to the newly cloned directory |
| 85 | + cd knopf.css |
| 86 | + |
| 87 | + # Assign the original repo to a remote called "upstream" |
| 88 | + git remote add upstream git@github.com:systemsthinkinginstitute/knopf.css.git |
| 89 | + |
| 90 | + # Install the tools necessary for testing |
| 91 | + npm install |
| 92 | + ``` |
| 93 | + |
| 94 | +2. Create a branch for your feature or fix: |
| 95 | + ```bash |
| 96 | + # Move into a new branch for your feature |
| 97 | + git checkout -b feature/thing |
| 98 | + ``` |
| 99 | + ```bash |
| 100 | + # Move into a new branch for your fix |
| 101 | + git checkout -b fix/something |
| 102 | + ``` |
| 103 | + |
| 104 | +3. If your code follows our practices, then push your feature branch: |
| 105 | + ```bash |
| 106 | + # Test current code |
| 107 | + npm test |
| 108 | + ``` |
| 109 | + ```bash |
| 110 | + # Push the branch for your new feature |
| 111 | + git push origin feature/thing |
| 112 | + ``` |
| 113 | + ```bash |
| 114 | + # Or, push the branch for your update |
| 115 | + git push origin update/something |
| 116 | + ``` |
| 117 | + |
| 118 | + Be sure to add a test to the `test.html` file if appropriate, and test |
| 119 | + your change in all supported browsers. |
| 120 | + |
| 121 | + |
| 122 | +Now [open a pull request] with a clear title and description. Remember, |
| 123 | +by submitting a patch, you agree to allow the project owner to license your |
| 124 | +work under the same license as that used by the project. |
| 125 | + |
| 126 | +## Maintainers |
| 127 | + |
| 128 | +If you have commit access, please follow this process for merging patches and |
| 129 | +cutting new releases. |
| 130 | + |
| 131 | +### Accepting patches |
| 132 | + |
| 133 | +1. Check that a patch is within the scope and philosophy of the project. |
| 134 | +2. Check that a patch has any necessary tests and a proper, descriptive commit |
| 135 | + message. |
| 136 | +3. Test the patch locally. |
| 137 | +4. Use GitHub’s merge button with caution or apply the patch locally, squashing |
| 138 | + any commits. |
| 139 | + |
| 140 | +### Releasing a new version |
| 141 | + |
| 142 | +1. Include all new functional changes in CHANGELOG.md. |
| 143 | +2. Create an annotated tag for the version: `git tag -m "0.0.0" 0.0.0`. |
| 144 | +3. Push the changes and tags to GitHub: `git push --tags origin master` |
| 145 | +4. Update the `gh-pages` branch, |
| 146 | + 1. Copy the latest knopf.css and test.html from the master branch into |
| 147 | + the root directory, the `latest` directory, and a new directory named |
| 148 | + after the new version: `0.0.0`. |
| 149 | + 2. Update the knopf.css version and supported browsers in `index.html`. |
| 150 | + |
| 151 | +### Semver strategy |
| 152 | + |
| 153 | +[Semver](http://semver.org/) is a widely accepted method for deciding how |
| 154 | +version numbers are incremented in a project. Versions are written as |
| 155 | +MAJOR.MINOR.PATCH. |
| 156 | + |
| 157 | +[already been reported]: https://github.com/systemsthinkinginstitute/knopf.css/issues |
| 158 | +[fork this project]: https://github.com/systemsthinkinginstitute/knopf.css/fork |
| 159 | +[live example]: https://codepen.io/pen |
| 160 | +[open a pull request]: https://help.github.com/articles/using-pull-requests/ |
| 161 | +[reduced test case]: https://css-tricks.com/reduced-test-cases/ |
0 commit comments