This repository has been archived by the owner on Mar 2, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathGruntfile.js
73 lines (73 loc) · 1.75 KB
/
Gruntfile.js
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 = function(grunt){
grunt.initConfig({
mocha_istanbul: {
coverage: {
src: 'test', // a folder works nicely
}
},
istanbul_check_coverage: {
default: {
options: {
coverage : true,
reporter: 'spec',
coverageFolder: 'coverage', // will check both coverage folders and merge the coverage results
check: {
lines: 100,
branches: 100,
statements: 100
}
}
}
},
jsdoc : {
default : {
src: ['lib/*.js'],
options: {
destination: 'out'
}
}
},
jshint: {
default : {
src: ['lib/*.js'],
options : {
"smarttabs" : true,
"bitwise" : true,
"curly" : true,
"eqeqeq" : true,
"es3" : false,
"forin" : false,
"immed" : true,
"indent" : 4,
"noarg" : true,
"noempty" : true,
"nonew" : false,
"trailing" : true,
"maxparams" : 5,
"maxdepth" : 4,
"maxstatements" : false,
"maxlen" : 120,
"node" : true,
"quotmark" : false,
"force" : false,
"ignores" : [ "node_modules/**/*.js" ],
"expr" : true,
"globals" : {
"describe" : false,
"it" : false,
"before" : false,
"beforeEach" : false,
"after" : false,
"afterEach" : false,
"unescape" : false
}
}
}
},
});
grunt.loadNpmTasks('grunt-mocha-istanbul');
grunt.loadNpmTasks('grunt-jsdoc');
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.registerTask('default', ['jshint', 'mocha_istanbul:coverage', 'istanbul_check_coverage']);
grunt.registerTask('doc', ['jsdoc']);
};