-
Notifications
You must be signed in to change notification settings - Fork 0
/
gruntfile.js
61 lines (55 loc) · 1.86 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
/// <vs BeforeBuild='build, test' />
module.exports = function (grunt) {
// Project configuration.
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
watch: {
files: ['./lib/**/*', './bin/**/*', './spec/**/*'],
tasks: ['jshint:all', 'jasmine_nodejs:all'],
},
jshint: {
all: ['./bin/*.js', './lib/*.js'],
options: {
curly: true,
eqeqeq: true,
quotmark: 'single',
shadow: 'outer',
undef: true,
unused: true,
globalstrict: true,
globals: {
module: false,
process: false,
require: false,
console: false
}
}
},
jasmine_nodejs: {
options: {
specNameSuffix: ".js", // also accepts an array
helperNameSuffix: ".js",
useHelpers: true,
stopOnFailure: false,
reporters: {
console: {
colors: true,
cleanStack: 1, // (0|false)|(1|true)|2|3
verbosity: 4, // (0|false)|1|2|3|(4|true)
listStyle: "indent", // "flat"|"indent"
activity: false
},
},
},
all: {
specs: ['./spec/**/describe_*.js'],
healpers: ['./spec/helpers/**']
}
}
});
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-jasmine-nodejs');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.registerTask('test', ['jshint:all', 'jasmine_nodejs:all']);
grunt.registerTask('test-continuous', ['watch']);
};