-
Notifications
You must be signed in to change notification settings - Fork 18
/
Gruntfile.js
40 lines (36 loc) · 879 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
module.exports = function(grunt) {
'use strict';
// Project configuration.
grunt.initConfig({
jasmine : {
src : 'src/**/*.js',
options : {
specs : 'spec/**/*.js'
}
},
peg: {
ingreedy: {
src: 'grammar/ingreedy.peg',
dest: 'src/parser.js',
options: { exportVar: 'Ingreedy' }
}
},
watch: {
grammar: {
files: ['grammar/*.peg'],
tasks: ['build', 'test']
},
test: {
files: ['spec/**/*.js'],
tasks: ['test']
}
}
});
grunt.loadNpmTasks('grunt-contrib-jasmine');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-peg');
grunt.registerTask('test', ['jasmine']);
grunt.registerTask('build', ['peg']);
grunt.registerTask('travis', ['build', 'test']);
grunt.registerTask('default', ['build', 'test']);
};