1 | module.exports = (grunt) ->
|
2 |
|
3 |
|
4 | grunt.initConfig
|
5 | pkgFile: 'package.json'
|
6 |
|
7 | 'npm-contributors':
|
8 | options:
|
9 | commitMessage: 'chore: update contributors'
|
10 |
|
11 | bump:
|
12 | options:
|
13 | commitMessage: 'chore: release v%VERSION%'
|
14 | pushTo: 'origin'
|
15 |
|
16 | 'auto-release':
|
17 | options:
|
18 | checkTravisBuild: false
|
19 |
|
20 | jshint:
|
21 | options:
|
22 |
|
23 | '-W030': true,
|
24 | globals:
|
25 | node: true,
|
26 | console: true,
|
27 | module: true,
|
28 | require: true
|
29 | all:
|
30 | src: ['*.js']
|
31 |
|
32 | coffeelint:
|
33 | options:
|
34 | no_tabs: {level: 'ignore'}
|
35 | indentation: {level: 'ignore'}
|
36 | dev: ['*.coffee', 'lib/*.coffee', 'test/*.coffee']
|
37 |
|
38 | simplemocha:
|
39 | options:
|
40 | ui: 'bdd'
|
41 | reporter: 'spec'
|
42 | all: src: ['test/*.coffee']
|
43 |
|
44 | coffee:
|
45 | compile:
|
46 | options:
|
47 | bare: true
|
48 | files:
|
49 | 'index.js': 'parse.coffee'
|
50 |
|
51 | grunt.loadNpmTasks 'grunt-contrib-coffee'
|
52 | grunt.loadNpmTasks 'grunt-contrib-jshint'
|
53 | grunt.loadNpmTasks 'grunt-coffeelint'
|
54 | grunt.loadNpmTasks 'grunt-simple-mocha'
|
55 | grunt.loadNpmTasks 'grunt-npm'
|
56 | grunt.loadNpmTasks 'grunt-bump'
|
57 | grunt.loadNpmTasks 'grunt-auto-release'
|
58 |
|
59 | grunt.registerTask 'release', 'Bump the version and publish to NPM.',
|
60 | (type) -> grunt.task.run [
|
61 | 'npm-contributors',
|
62 | "bump:#{type||'patch'}",
|
63 | 'npm-publish'
|
64 | ]
|
65 |
|
66 | grunt.registerTask 'lint', ['coffeelint']
|
67 | grunt.registerTask 'build', ['coffee']
|
68 | grunt.registerTask 'test', ['lint', 'build', 'simplemocha']
|
69 | grunt.registerTask 'default', ['test']
|