forked from pluralsight/htmlTagValidator
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathGruntfile.js
51 lines (49 loc) · 1.47 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
module.exports = function(grunt) {
grunt.initConfig({
shell: {
pegjs: {
options: {
failOnError: true
},
command: './node_modules/.bin/pegjs -o src/html-parser.js src/html-grammar.pegjs'
},
test: {
options: {
failOnError: true,
execOptions: {
maxBuffer: Infinity
}
},
command: './node_modules/.bin/mocha test/index-spec.js --reporter="nyan" --color'
},
debug: {
options: {
failOnError: false,
debounceDelay: 2000,
forever: true
},
command: 'DEBUG=true ./node_modules/.bin/mocha test/index-spec.js --reporter="list" -- --debug-brk --inspect'
},
watchDebug: {
options: {
failOnError: false,
debounceDelay: 2000,
forever: true
},
command: 'DEBUG=true ./node_modules/.bin/mocha test/index-spec.js --reporter="list"'
}
},
watch: {
debug: {
files: ['Gruntfile.js', 'test/*.js', 'src/*.js', 'src/*.pegjs', 'test/html/*.html', 'index.js'],
tasks: ['default', 'shell:watchDebug']
}
}
});
grunt.loadNpmTasks('grunt-shell');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.registerTask('default', ['shell:pegjs']);
grunt.registerTask('test', ['default', 'shell:test']);
grunt.registerTask('debug', ['default', 'shell:debug']);
grunt.registerTask('watch debug', ['default', 'watch:debug']);
};