1 | module.exports = (grunt) ->
|
2 |
|
3 | grunt.initConfig
|
4 | pkgFile: 'package.json'
|
5 |
|
6 | 'npm-contributors':
|
7 | options:
|
8 | commitMessage: 'chore: update contributors'
|
9 |
|
10 | bump:
|
11 | options:
|
12 | commitMessage: 'chore: release v%VERSION%'
|
13 | pushTo: 'origin'
|
14 |
|
15 | 'auto-release':
|
16 | options:
|
17 | checkTravisBuild: false
|
18 |
|
19 | jshint:
|
20 | options:
|
21 |
|
22 | '-W030': true,
|
23 | globals:
|
24 | node: true,
|
25 | console: true,
|
26 | module: true,
|
27 | require: true
|
28 | all:
|
29 | src: ['*.js', 'lib/**/*.js', 'test/**/*.js']
|
30 |
|
31 | coffeelint:
|
32 | options:
|
33 | no_tabs: {level: 'ignore'}
|
34 | indentation: {level: 'ignore'}
|
35 | all: ['*.coffee']
|
36 |
|
37 | grunt.loadNpmTasks 'grunt-contrib-jshint'
|
38 | grunt.loadNpmTasks 'grunt-coffeelint'
|
39 | grunt.loadNpmTasks 'grunt-npm'
|
40 | grunt.loadNpmTasks 'grunt-bump'
|
41 | grunt.loadNpmTasks 'grunt-auto-release'
|
42 |
|
43 | grunt.registerTask 'release', 'Bump the version and publish to NPM.',
|
44 | (type) -> grunt.task.run [
|
45 | 'npm-contributors',
|
46 | "bump:#{type||'patch'}",
|
47 | 'npm-publish'
|
48 | ]
|
49 |
|
50 | grunt.registerTask 'lint', ['coffeelint', 'jshint']
|
51 | grunt.registerTask 'default', ['test']
|