forked from sergeyt/fogbugz.js
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Gruntfile.coffee
78 lines (66 loc) · 1.79 KB
/
Gruntfile.coffee
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
module.exports = (grunt) ->
# Project configuration.
grunt.initConfig
pkgFile: 'package.json'
'npm-contributors':
options:
commitMessage: 'chore: update contributors'
bump:
options:
commitMessage: 'chore: release v%VERSION%'
pushTo: 'origin'
'auto-release':
options:
checkTravisBuild: false
jshint:
options:
# Expected an assignment or function call and instead saw an expression.
'-W030': true,
globals:
node: true,
console: true,
module: true,
require: true
dev:
options:
ignores: ['*.min.js', 'lib/*.min.js', 'bin/*.min.js']
src: ['lib/*.js', 'bin/*.js', '*.js']
coffeelint:
options:
no_tabs: {level: 'ignore'}
indentation: {level: 'ignore'}
dev: ['*.coffee', 'bin/*.coffee', 'lib/*.coffee']
simplemocha:
options:
ui: 'bdd'
reporter: 'spec'
all: src: ['test/*.coffee']
karma:
dev:
configFile: 'karma.conf.js',
singleRun: true
lcov:
configFile: 'karma.conf.lcov.js',
singleRun: true
coveralls:
options:
debug: true,
coverage_dir: '.coverage'
grunt.loadNpmTasks 'grunt-contrib-jshint'
grunt.loadNpmTasks 'grunt-coffeelint'
grunt.loadNpmTasks 'grunt-npm'
grunt.loadNpmTasks 'grunt-bump'
grunt.loadNpmTasks 'grunt-auto-release'
grunt.loadNpmTasks 'grunt-simple-mocha'
grunt.loadNpmTasks 'grunt-karma'
grunt.loadNpmTasks 'grunt-karma-coveralls'
grunt.registerTask 'release', 'Bump the version and publish to NPM.',
(type) -> grunt.task.run [
'npm-contributors',
"bump:#{type||'patch'}",
'npm-publish'
]
grunt.registerTask 'lint', ['coffeelint', 'jshint']
grunt.registerTask 'test', ['lint', 'simplemocha', 'karma:dev']
grunt.registerTask 'default', ['test']
grunt.registerTask 'drone', ['lint', 'simplemocha', 'karma:lcov', 'coveralls']