-
Notifications
You must be signed in to change notification settings - Fork 68
/
Gruntfile.js
61 lines (59 loc) · 1.37 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
module.exports = function(grunt) {
grunt.initConfig({
uglify: {
options: {
compress: false,
mangle: false
},
dist: {
files: {
'plugin/beautify.min.js': ['plugin/beautify.js']
}
}
},
nodeunit: {
all: ['test/javascript/*_test.js'],
node: ['test/javascript/beautify_test.js']
},
lint: {
files: ['grunt.js', 'plugin/*js', '<config:test.files>']
},
watch: {
vim: {
files: ['plugin/*.vim', 't/**/*'],
tasks: 'rake test'
},
javascript: {
files: ['plugin/*.js', 'test/javascript/**/*.js'],
tasks: 'test'
}
},
jshint: {
options: {
curly: true,
eqeqeq: true,
immed: true,
latedef: true,
newcap: true,
noarg: true,
sub: true,
undef: true,
boss: true,
eqnull: true,
node: true
},
globals: {
exports: true,
module: false
}
}
});
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-contrib-nodeunit');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-contrib-uglify');
// Default task.
grunt.registerTask('test', ['nodeunit:all']);
grunt.registerTask('default', ['nodeunit:all']);
grunt.registerTask('build', ['jshint', 'nodeunit:all', 'uglify']);
};