-
Notifications
You must be signed in to change notification settings - Fork 30
/
Gruntfile.js
32 lines (29 loc) · 853 Bytes
/
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
module.exports = function (grunt) {
var js_files = ['Gruntfile.js', 'lib/**/*.js', 'test/**/*.js'];
grunt.initConfig({
jshint: {
options: {
jshintrc: '.jshintrc',
reporter: require('jshint-stylish')
},
all: js_files
},
mochaTest: {
test: {
options: {
reporter: 'spec'
},
src: ['test/**/*.js']
}
},
watch: {
files: js_files,
tasks: ['jshint', 'mochaTest']
}
});
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-mocha-test');
grunt.registerTask('default', ['watch']);
grunt.registerTask('test', ['jshint', 'mochaTest']);
};