Skip to content
100644 49 lines (36 sloc) 2.55 KB
9c1da0e @asciidisco Added further meta files
authored Nov 28, 2012
1 # Contributing to grunt-requirejs
3 ## Filing issues
4 If something isn't working like you think it should, please read the documentation first.
6 The best way to ensure an issue gets addressed is to file it in the appropriate issues tracker.
8 ### Simplify the issue
9 Try to [reduce your code]( to the bare minimum required to reproduce the issue. This makes it much easier (and much faster) to isolate and fix the issue.
11 ### Explain the issue
12 If we can't reproduce the issue, we can't fix it. Please list the exact steps required to reproduce the issue. Include versions of your OS, Node.js, grunt, etc. Include relevant logs or sample code.
14 ## Modifying grunt-requirejs
15 First, ensure that you have the latest [Node.js]( and [npm]( installed.
17 1. Fork and clone the repo.
18 2. Check out the correct branch. Currently, the development happens in the `devel` branch.
19 3. Run `npm install` to install all grunt-requirejs dependencies.
20 4. Run `grunt travis` to test & lint the plugin.
22 Assuming that you don't see any red, you're ready to go. Just be sure to run `grunt` after making any changes, to ensure that nothing breaks.
24 ### Submitting pull requests
26 1. Create a new branch, please don't work in your `master` or `devel` branch directly.
27 2. Add failing tests for the change you want to make. Run `grunt` to see the tests fail.
28 3. Fix stuff.
5ac0858 @asciidisco Added some more tests
authored Nov 30, 2012
29 4. Run `grunt` to see if the tests pass. Repeat steps 2-4 until done.
9c1da0e @asciidisco Added further meta files
authored Nov 28, 2012
30 5. Update the documentation to reflect any changes.
31 6. Push to your fork and submit a pull request.
5ac0858 @asciidisco Added some more tests
authored Nov 30, 2012
33 ### Adding tests
34 Tests are written in NodeUnit & QUnit style.
35 NodeUnit tests can be run using the ´grunt test´ command.
36 The tests from the examples directory can be run using ´grunt qunit´, but make sure
37 you are running ´grunt setUp´ before & ´grunt tearDown´ afterwards.
9c1da0e @asciidisco Added further meta files
authored Nov 28, 2012
39 ### Syntax
41 * Two space indents. Don't use tabs anywhere. Use `\t` if you need a tab character in a string.
42 * No trailing whitespace, except in markdown files where a linebreak must be forced.
43 * Don't go overboard with the whitespace.
44 * No more than [one assignment]( per `var` statement.
45 * Delimit strings with single-quotes `'`, not double-quotes `"`.
46 * Prefer `if` and `else` to ["clever"]( uses of `? :` conditional or `||`, `&&` logical operators.
47 * Comments are great. Just put them _before_ the line of code, _not_ at the _end_ of the line.
48 * **When in doubt, follow the conventions you see used in the source already.**
Something went wrong with that request. Please try again.