forked from chuanyi/msexcel-builder
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Gruntfile.js
36 lines (31 loc) · 818 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
module.exports = function(grunt) {
var path = require("path");
// Project configuration.
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
coffee: {
dynamic_mappings: {
expand: true,
flatten: false,
cwd: 'src/',
src: ['**/*.coffee'],
dest: 'lib/',
ext: '.js'
}
},
watch: {
coffee: {
files: ['src/*.coffee'],
tasks: 'coffee'
},
}
});
grunt.event.on('watch', function(action, filepath, target) {
console.log(filepath);
grunt.config(['coffee', 'dynamic_mappings', 'files', 'src'], filepath);
} );
// Load the plugin that provides the "less" task.
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-contrib-coffee');
grunt.registerTask('default', ['coffee:dynamic_mappings', 'watch']);
};