Last change
on this file since 516 was
516,
checked in by hendrikvanantwerpen, 11 years ago
|
Enable deployment with Grunt.
|
File size:
1.5 KB
|
Rev | Line | |
---|
[484] | 1 | [](http://travis-ci.org/vojtajina/grunt-coffeelint) |
---|
| 2 | # grunt-coffeelint |
---|
| 3 | |
---|
| 4 | **Lint your CoffeeScript by [CoffeeLint].** |
---|
| 5 | |
---|
| 6 | ## Installation |
---|
| 7 | |
---|
| 8 | Install npm package, next to your project's `Gruntfile.js` file: |
---|
| 9 | |
---|
| 10 | npm install grunt-coffeelint |
---|
| 11 | |
---|
| 12 | Add this line to your project's `Gruntfile.js`: |
---|
| 13 | |
---|
| 14 | grunt.loadNpmTasks('grunt-coffeelint'); |
---|
| 15 | |
---|
[516] | 16 | ## Options |
---|
[484] | 17 | |
---|
[516] | 18 | A few additional options are supported: |
---|
| 19 | |
---|
| 20 | ### force |
---|
| 21 | Type: `Boolean` |
---|
| 22 | Default value: `false` |
---|
| 23 | |
---|
| 24 | Set `force` to `true` to report CoffeeLint errors but not fail the task. |
---|
| 25 | |
---|
[484] | 26 | ## Configuration |
---|
| 27 | |
---|
| 28 | `coffeelint` is a multitask, so you can use it similary to `lint`, `watch` etc... |
---|
| 29 | |
---|
| 30 | ````javascript |
---|
| 31 | grunt.initConfig({ |
---|
| 32 | ... |
---|
| 33 | coffeelint: { |
---|
| 34 | app: ['app/*.coffee', 'scripts/*.coffee'] |
---|
| 35 | } |
---|
| 36 | }, |
---|
| 37 | ... |
---|
| 38 | }); |
---|
| 39 | ```` |
---|
| 40 | |
---|
| 41 | ### Options per target |
---|
| 42 | |
---|
| 43 | ````javascript |
---|
| 44 | grunt.initConfig({ |
---|
| 45 | ... |
---|
| 46 | coffeelint: { |
---|
| 47 | app: ['app/*.coffee', 'scripts/*.coffee'], |
---|
| 48 | tests: { |
---|
| 49 | files: { |
---|
| 50 | src: ['tests/*.coffee'] |
---|
| 51 | }, |
---|
| 52 | options: { |
---|
| 53 | 'no_trailing_whitespace': { |
---|
| 54 | 'level': 'error' |
---|
| 55 | } |
---|
| 56 | } |
---|
| 57 | } |
---|
| 58 | }, |
---|
| 59 | ... |
---|
| 60 | }); |
---|
| 61 | ```` |
---|
| 62 | |
---|
| 63 | ### Global - default options |
---|
| 64 | |
---|
| 65 | ````javascript |
---|
| 66 | grunt.initConfig({ |
---|
| 67 | ... |
---|
| 68 | coffeelint: { |
---|
| 69 | options: { |
---|
| 70 | 'no_trailing_whitespace': { |
---|
| 71 | 'level': 'error' |
---|
| 72 | } |
---|
| 73 | } |
---|
| 74 | }, |
---|
| 75 | ... |
---|
| 76 | }); |
---|
| 77 | ```` |
---|
| 78 | |
---|
[516] | 79 | For available options see [coffeelint homepage]. |
---|
[484] | 80 | |
---|
| 81 | [CoffeeLint]: http://www.coffeelint.org/ |
---|
| 82 | [coffeelint homepage]: http://www.coffeelint.org/ |
---|
Note: See
TracBrowser
for help on using the repository browser.