-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathGruntfile.coffee
More file actions
73 lines (59 loc) · 1.5 KB
/
Gruntfile.coffee
File metadata and controls
73 lines (59 loc) · 1.5 KB
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
module.exports = (grunt) ->
# Load all grunt tasks available
require('matchdep').filterDev('grunt-*').forEach(grunt.loadNpmTasks)
grunt.initConfig {
bin:
covershot: './node_modules/covershot/bin/covershot'
coveralls: './node_modules/coveralls/bin/coveralls.js'
env:
test:
NODE_ENV: 'test'
coffeelint:
app: [ '*.coffee', 'lib/**/*.coffee', 'test/**/*.coffee' ],
options:
max_line_length:
value: 80
mochacli:
options:
reporter: 'nyan',
globals: ['data']
compilers: ['coffee:coffee-script']
all: ['test/**/*.coffee']
coffeeCoverage:
lib:
src: 'lib/'
dest: 'lib-cov/'
exec:
prepcov:
cmd: 'mkdir -p covershot/data'
htmlcov:
cmd: '<%= bin.covershot %> covershot/data -f html'
lcov:
cmd: '<%= bin.covershot %> covershot/data -f lcov'
coveralls:
cmd: 'cat covershot/coverage.lcov | <%= bin.coveralls %>'
clean:
coverage: ['lib-cov']
}
grunt.registerTask 'test', [
'env:test',
'coffeelint',
'mochacli'
]
grunt.registerTask 'coverage:instrument', [
'exec:prepcov',
'coffeeCoverage:lib',
]
grunt.registerTask 'coverage:html', [
'coverage:instrument',
'test',
'exec:htmlcov',
'clean:coverage'
]
grunt.registerTask 'coverage:travis', [
'coverage:instrument',
'test'
'exec:lcov',
'exec:coveralls'
]
grunt.registerTask 'default', ['test']