-
Notifications
You must be signed in to change notification settings - Fork 10
/
Gruntfile.js
56 lines (49 loc) · 1.77 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
module.exports = function(grunt) {
// Project configuration.
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
//see https://github.com/gruntjs/grunt-contrib-nodeunit
//only files ending in _test.js in directory and subdirectories of test are run
nodeunit: {
all: ['test/**/*_test.js'],
send_item: ['test/send_item_test.js'],
auction: ['test/auction_test.js'],
firebase: ['test/firebase_test.js'],
authentication: ['test/authentication_test.js'],
hsm_to_rules: ['test/hsm_to_rules_test.js'],
exhaustive: ['test/exhaustive_hsm_test.js'],
injection: ['test/injection_test.js'],
closure: ['test/closure_test.js']
},pandoc: {
toHtml: {
configs: {
"publish" : 'HTML'
},
files: {
"from": [
"README.md"
]
}
}
},peg: {
hsm_to_rules: {
src: "doc/hsm.grammar",
dest: "src/hsm_to_rules_parser.js",
options: { exportVar: "exports.parser" }
}
}
});
// Load the plugins for this project
grunt.loadNpmTasks('grunt-contrib-nodeunit');
grunt.loadNpmTasks('grunt-pandoc');
grunt.loadNpmTasks('grunt-peg');
// Default task(s).
grunt.registerTask('default', ['nodeunit']);
// generate documentation
grunt.registerTask('doc', ['pandoc']);
// generate parsers
grunt.registerTask('parser', ['peg']);
grunt.registerTask('test_parser', ['peg', "nodeunit:hsm_to_rules"]);
grunt.registerTask('test_exhaustive', ['peg', "nodeunit:exhaustive"]);
grunt.registerTask('test', ['peg', "nodeunit:all"]);
};