forked from node-pcap/node_pcap
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Gruntfile.js
52 lines (48 loc) · 1.4 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
module.exports = function(grunt) {
var src = ["*.js", "decode/**/*.js"];
var tests = ["spec/**/*.js"];
var supportingFiles = ["Gruntfile.js"];
var allJs = tests.concat(src);
grunt.initConfig({
jshint: {
options: {
jshintrc: true
},
files: {
src: allJs
}
},
mochaTest: {
test: {
src: allJs,
}
},
mocha_istanbul: {
coverage: {
src: allJs,
options: {
reportFormats: ["text", "html", "lcov"],
excludes: tests.concat(supportingFiles)
}
}
},
coveralls: {
options: {
force: true
},
src: {
src: "coverage/lcov.info"
}
},
});
grunt.loadNpmTasks("grunt-coveralls");
grunt.loadNpmTasks("grunt-mocha-test");
grunt.loadNpmTasks("grunt-contrib-jshint");
grunt.loadNpmTasks("grunt-mocha-istanbul");
//The travis ci build
grunt.registerTask("travis", ["jshint", "mocha_istanbul:coverage", "coveralls:src"]);
//Check code coverage with grunt cover
grunt.registerTask("cover", ["mocha_istanbul:coverage"]);
//Just run grunt for day to day work
grunt.registerTask("default", ["jshint", "mochaTest:test"]);
};