File tree Expand file tree Collapse file tree 1 file changed +42
-0
lines changed Expand file tree Collapse file tree 1 file changed +42
-0
lines changed Original file line number Diff line number Diff line change 1+ module .exports = (grunt ) ->
2+ JS_PATH = ' js/'
3+ JS_FILE = JS_PATH+ ' qiniu.js'
4+
5+ grunt .initConfig
6+ jshint :
7+ options :
8+ jshintrc : ' .jshintrc'
9+ all : [JS_FILE]
10+
11+ uglify :
12+ compress :
13+ options :
14+ report : ' min'
15+ files : [{
16+ expand : true
17+ src : [JS_FILE]
18+ }]
19+ copy :
20+ main :
21+ expand : true ,
22+ flatten : true ,
23+ src : ' src/qiniu.js' ,
24+ dest : ' demo/js/'
25+
26+ grunt .loadNpmTasks ' grunt-contrib-watch'
27+ grunt .loadNpmTasks ' grunt-contrib-uglify'
28+ grunt .loadNpmTasks ' grunt-contrib-jshint'
29+ grunt .loadNpmTasks ' grunt-contrib-copy'
30+
31+ grunt .event .on ' watch' , (action , filepath ) ->
32+ grunt .config [' jshint' , ' all' ], filepath
33+
34+ grunt .registerTask ' production' , [
35+ ' jshint'
36+ ' uglify:compress'
37+ ]
38+
39+ grunt .registerTask ' default' , [
40+ ' jshint'
41+ ' copy'
42+ ]
You can’t perform that action at this time.
0 commit comments