-
Notifications
You must be signed in to change notification settings - Fork 23
/
Gruntfile.js
51 lines (50 loc) · 1.25 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
// Generated on 2014-07-07 using generator-nodejs 2.0.1
module.exports = function (grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
complexity: {
generic: {
src: ['app/**/*.js'],
options: {
errorsOnly: false,
cyclometric: 6, // default is 3
halstead: 16, // default is 8
maintainability: 100 // default is 100
}
}
},
jshint: {
all: [
'Gruntfile.js',
'app/**/*.js',
'test/**/*.js'
],
options: {
jshintrc: '.jshintrc'
}
},
mochacli: {
all: ['test/**/*.js'],
options: {
reporter: 'spec',
ui: 'tdd'
}
},
watch: {
js: {
files: ['**/*.js', '!node_modules/**/*.js'],
tasks: ['default'],
options: {
nospawn: true
}
}
}
});
grunt.loadNpmTasks('grunt-complexity');
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-mocha-cli');
grunt.registerTask('test', ['complexity', 'jshint', 'mochacli', 'watch']);
grunt.registerTask('ci', ['complexity', 'jshint', 'mochacli']);
grunt.registerTask('default', ['test']);
};