From 976f8465273d669bf681a93229f5701f473eec5d Mon Sep 17 00:00:00 2001 From: Jakub Pawlowicz Date: Mon, 11 May 2015 19:24:10 +0100 Subject: [PATCH] Adds contributing guideline. --- CONTRIBUTING.md | 50 +++++++++++++++++++++++++++++++++++++++++++++++++ README.md | 15 +-------------- 2 files changed, 51 insertions(+), 14 deletions(-) create mode 100644 CONTRIBUTING.md diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 00000000..45ddd178 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,50 @@ +# Bug reports + +Every piece of software has bugs, and squashing them should always be the priority. + +If you spotted an incorrect behavior, knowing the following facts will help fixing it: + +* What's your input CSS and expected output? +* Do you use clean-css directly or through any of the [plugins](https://github.com/jakubpawlowicz/clean-css#how-to-use-clean-css-with-build-tools)? +* What options do you pass to clean-css / the plugin? +* What version of clean-css do you use? +* What operating system do you use? + +# Pull requests + +We love pull requests! To contribute to clean-css first fork, then clone the repo: + +```shell +git clone git@github.com:your-username/clean-css.git +``` + +Make sure you have node 0.10+ installed so npm can download all dependencies for you: + +```shell +npm install +``` + +Make sure the tests pass: + +```shell +npm test +``` + +Then add tests for your change. Check if tests fail. Make your change. Make the tests pass. + +At the end make sure code styling validation passes: + +```shell +npm run check +``` + +Finally push to your fork and [submit a pull request](https://github.com/jakubpawlowicz/clean-css/compare/). + +At this point you're waiting for a PR review which should not thake more than a day. + +Some things that will increase the chance that your pull request is accepted: + +* Write tests. +* Write self-documenting code. +* Squash commits. +* Write a [good commit message](http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html). diff --git a/README.md b/README.md index 2a117b8d..1cae3ef8 100644 --- a/README.md +++ b/README.md @@ -171,20 +171,7 @@ First clone the source, then run: ## How to contribute to clean-css? -1. Fork it. -2. Add test(s) veryfying the problem. -3. Fix the problem. -4. Make sure all tests still pass (`npm test`). -5. Make sure your code doesn't break style rules (`npm run check`) and follow all [other ones](https://github.com/jakubpawlowicz/clean-css/wiki/Style-Guide) too. -6. Send a PR. - -If you wonder where to add tests, go for: - -* `test/integration-test.js` if it's a simple scenario -* `test/fixtures/...` if it's a complex scenario (just add two files, input and expected output) -* `test/binary-test.js` if it's related to `bin/cleancss` binary -* `test/module-test.js` if it's related to importing `clean-css` as a module -* `test/protocol-imports-test.js` if it fixes anything related to protocol `@import`s +See [CONTRIBUTING.md](https://github.com/jakubpawlowicz/clean-css/blob/master/CONTRIBUTING.md). ## Tips & Tricks -- 2.34.1