-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGruntfile.js
37 lines (32 loc) · 888 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
module.exports = function (grunt) {
grunt.initConfig({
jshint: {
all: ['Gruntfile.js', 'index.js', 'testmode.js'],
options: {
jshintrc: '.jshintrc'
}
},
jsbeautifier: {
modify: {
src: ['Gruntfile.js', 'index.js', 'testmode.js'],
options: {
config: '.jsbeautifyrc'
}
},
validate: {
src: ['Gruntfile.js', 'index.js', 'testmode.js'],
options: {
mode: 'VERIFY_ONLY',
config: '.jsbeautifyrc'
}
}
}
});
grunt.loadNpmTasks('grunt-jsbeautifier');
grunt.loadNpmTasks('grunt-contrib-jshint');
// Clean code before a commit
grunt.registerTask('clean', ['jsbeautifier:modify', 'jshint']);
// Validate code (read only)
grunt.registerTask('validate', ['jsbeautifier:validate', 'jshint']);
grunt.registerTask('default', ['jshint']);
};