|
| 1 | +# Contributing to CSSComb |
| 2 | + |
| 3 | +<a name="pull-requests"></a> |
| 4 | +## Pull requests |
| 5 | + |
| 6 | +1. [Fork](http://help.github.com/fork-a-repo/) the project, clone your fork, and configure the remotes: |
| 7 | +```bash |
| 8 | +# Clone your fork of the repo into the current directory |
| 9 | +git clone https://github.com/<your-username>/csscomb.js |
| 10 | +# Navigate to the newly cloned directory |
| 11 | +cd csscomb.js |
| 12 | +# Assign the original repo to a remote called `upstream` |
| 13 | +git remote add upstream https://github.com/csscomb/csscomb.js |
| 14 | +``` |
| 15 | + |
| 16 | +2. If you cloned a while ago, get the latest changes from upstream: |
| 17 | +```bash |
| 18 | +git checkout dev |
| 19 | +git pull upstream dev |
| 20 | +``` |
| 21 | +**IMPORTANT**: We are using `dev` branch for development, not `master`. |
| 22 | + |
| 23 | +3. Create a topic branch for your feature, change, or fix: |
| 24 | +```bash |
| 25 | +git checkout -b <topic-branch-name> |
| 26 | +``` |
| 27 | + |
| 28 | +4. Patches and features will not be accepted without tests. |
| 29 | + Run `npm test` to check that all tests pass after you've made changes. |
| 30 | + |
| 31 | +5. Locally rebase the upstream development branch into your topic branch: |
| 32 | +```bash |
| 33 | +git pull --rebase upstream dev |
| 34 | +``` |
| 35 | + |
| 36 | +7. Push your topic branch up to your fork: |
| 37 | +```bash |
| 38 | +git push origin <topic-branch-name> |
| 39 | +``` |
| 40 | + |
| 41 | +8. [Open a Pull Request](https://help.github.com/articles/using-pull-requests/) with a clear title and description. |
| 42 | + |
| 43 | +<a name="maintainers"></a> |
| 44 | +## Maintainers |
| 45 | + |
| 46 | +### Submitting changes |
| 47 | + |
| 48 | +1. All non-trivial changes should be put up for review using GitHub Pull Requests. |
| 49 | +2. Your change should not be merged into `dev`, without at least one "OK" comment |
| 50 | + from another maintainer/collaborator on the project. |
| 51 | +3. Once a feature branch has been merged into its target branch, please delete |
| 52 | + the feature branch from the remote repository. |
| 53 | + |
| 54 | +### Releasing a new version |
| 55 | + |
| 56 | +1. Include all new functional changes in the CHANGELOG. |
| 57 | +2. Use a dedicated commit to increment the version. The version needs to be |
| 58 | + added to the `CHANGELOG.md` (inc. date) and the `package.json`. |
| 59 | +3. The commit message must be of `v0.0.0` format. |
| 60 | +4. Merge `dev` into `master`. |
| 61 | +5. Create a tag for the version: `git tag v0.0.0`. |
| 62 | +6. Push the changes and tags to GitHub: `git push origin dev master v0.0.0`. |
| 63 | +7. Publish the new version to npm: `npm publish`. |
0 commit comments