-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathGruntfile.js
More file actions
50 lines (43 loc) · 1.06 KB
/
Gruntfile.js
File metadata and controls
50 lines (43 loc) · 1.06 KB
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
'use strict';
var exec = require('child_process').exec;
module.exports = function (grunt) {
// Project configuration.
grunt.initConfig({
watch: {
run: {
files: 'app.nw/*',
tasks: ['run']
},
coffee: {
files: ['rime/*.coffee', 'app.nw/*.coffee'],
tasks: ['coffee']
}
},
coffee: {
compile: {
options: {
join: true
},
files: {
'app.nw/rime.js': ['rime/*.coffee'],
'app.nw/rimekit.js': ['app.nw/*.coffee']
}
}
},
nodeunit: {
all: ['test/test-*.coffee']
}
});
// These plugins provide necessary tasks.
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-contrib-coffee');
grunt.loadNpmTasks('grunt-contrib-nodeunit');
// Default task.
grunt.registerTask('default', ['watch']);
grunt.registerTask('build', ['coffee']);
grunt.registerTask('test', ['nodeunit']);
grunt.registerTask('run', 'Run node-webkit app', function () {
exec('nw app.nw');
});
};
// vim: set et sw=2 sts=2: