forked from devony/node-edit-xlsx
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathGruntfile.coffee
41 lines (34 loc) · 958 Bytes
/
Gruntfile.coffee
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
module.exports = (grunt) ->
grunt.loadNpmTasks 'grunt-exec'
grunt.loadNpmTasks 'grunt-contrib-coffee'
grunt.loadNpmTasks 'grunt-este-watch'
grunt.initConfig
exec:
ctags:
command: 'ctags -e -R --fields=+afikKlmnsSzt --languages=js'
cwd: './lib'
stdout: true
stderr: true
coffee:
compile:
options:
bare: true
sourceMap: true
esteWatch:
options:
dirs: ['./lib/**/', './tmp/**/']
livereload:
enabled: false
coffee: (filepath) ->
return if /\/qr_.+?\.coffee$/.test filepath
files = [
expand: true
src: filepath
ext: '.js'
]
grunt.config ['coffee', 'compile', 'files'], files
['coffee:compile']
js: (filepath) ->
return if /^tmp\/|\/qr_.+?\.js$/.test filepath
['exec:ctags']
grunt.registerTask 'default', ['exec:ctags', 'esteWatch']