Fixes #212 - adds contributing rules to readme.
authorGoal Smashers Dev Team <jakub@goalsmashers.com>
Sun, 26 Jan 2014 11:16:25 +0000 (11:16 +0000)
committerGoal Smashers Dev Team <jakub@goalsmashers.com>
Sun, 26 Jan 2014 11:16:25 +0000 (11:16 +0000)
Adds more information on how to contribute and where to put tests.

README.md

index d7c5432..f5a3b48 100644 (file)
--- a/README.md
+++ b/README.md
@@ -144,6 +144,23 @@ First clone the source, then run:
 * `npm run check` to check JS sources with [JSHint](https://github.com/jshint/jshint/)
 * `npm test` for the test suite
 
+## 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`).
+6. Send a PR.
+
+If you wonder where to add tests, go for:
+
+* `test\unit-test.js` if it's a simple scenario
+* `test\data\...` 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
+
 ## Tips & Tricks
 
 ### How to preserve a comment block?