-
Notifications
You must be signed in to change notification settings - Fork 0
/
Gruntfile.js
58 lines (54 loc) · 1.3 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
module.exports = function(grunt) {
"use strict";
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-contrib-nodeunit');
grunt.loadNpmTasks('grunt-contrib-jshint');
// Project configuration.
grunt.initConfig({
pkg: '<= package.json %>',
lint: {
files: ['grunt.js', 'tasks/**/*.js']
},
watch: {
gruntfile: {
files: ['<%= jshint.gruntfile %>'],
tasks: ['jshint:gruntfile']
},
libs_n_tests: {
files: ['<%= jshint.libs_n_tests %>'],
tasks: ['jshint:libs_n_tests']
},
tests: {
files: ['test/**/*.js', 'tasks/**/*.js'],
tasks: ['nodeunit']
},
files: '<%= lint.files %>',
tasks: ['default', 'nodeunit']
},
jshint: {
gruntfile: ['Gruntfile.js'],
libs_n_tests: ['lib/**/*.js', 'tasks/**/*.js'],
options: {
curly: true,
eqeqeq: true,
immed: true,
latedef: true,
newcap: true,
noarg: true,
sub: true,
undef: true,
unused: false,
boss: true,
eqnull: true,
node: true
}
},
nodeunit: {
all: ['test/**/*.js']
}
});
// Load local tasks.
grunt.loadTasks('tasks');
// Default task.
grunt.registerTask('default', ['jshint', 'nodeunit']);
};