-
Notifications
You must be signed in to change notification settings - Fork 20
/
gruntfile.js
45 lines (42 loc) · 892 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
33
34
35
36
37
38
39
40
41
42
43
44
45
module.exports = function(grunt) {
var libFiles = 'lib/**/*.js';
grunt.initConfig({
githooks: {
all: {
'pre-commit': {
taskNames: 'lint test'
}
}
},
jsdoc: {
dist: {
src: libFiles,
options: {
destination: 'doc'
}
}
},
jshint: {
dist: {
options: {
reporter: require('jshint-stylish')
},
target: libFiles
}
},
mochaTest: {
dist: {
src: [
'test/index.js'
]
}
}
});
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-githooks');
grunt.loadNpmTasks('grunt-jsdoc');
grunt.loadNpmTasks('grunt-mocha-test');
grunt.registerTask('doc', ['jshint:dist', 'jsdoc:dist']);
grunt.registerTask('lint', 'jshint:dist');
grunt.registerTask('test', 'mochaTest:dist');
};