-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathGruntfile.js
50 lines (44 loc) · 1.17 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
module.exports = function(grunt) {
// Combine all files in src/
grunt.initConfig({
watch:{
scripts:{
files: ['src/cashew.pre.js', 'src/coco-java.jison'],
tasks: ['shell:jison_compile','uglify', 'notify_hooks'],
options: {
interrupt : true
}
},
},
notify_hooks:{
options:{
enabled: true,
title: "Cashew",
success: true,
duration: 3,
}
},
shell: {
jison_compile:{
command: 'jison src/coco-java.jison && mv coco-java.js src/coco-java.js'
},
},
uglify: {
all_src : {
options : {
sourceMap : false,
sourceMapName : 'sourceMap.map'
},
files : {
'cashew.js' : ['src/coco-java.js','src/cashew.pre.js','src/underscore.modified.js']
} }
}
});
// Load the plugin that provides the "uglify" task.
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-shell');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-notify');
// Default task(s).
grunt.registerTask('default', ['shell:jison_compile','uglify', 'notify_hooks']);
};