File tree Expand file tree Collapse file tree 2 files changed +34
-0
lines changed Expand file tree Collapse file tree 2 files changed +34
-0
lines changed Original file line number Diff line number Diff line change
1
+ module . exports = function ( grunt ) {
2
+ grunt . initConfig ( {
3
+ pkg : grunt . file . readJSON ( 'package.json' ) ,
4
+ meta : {
5
+ banner : '/*! <%= pkg.name %> <%= grunt.template.today("yyyy-mm-dd HH:MM:ss") %> */'
6
+ } ,
7
+
8
+ // Minifies JS files
9
+ uglify : {
10
+ options : {
11
+ preserveComments : / ^ ! | @ p r e s e r v e | @ l i c e n s e | @ c c _ o n / i
12
+ } ,
13
+ dist : {
14
+ files : [ {
15
+ expand : true ,
16
+ cwd : 'src' ,
17
+ src : [ '*.js' , '!*.min.js' ] ,
18
+ dest : 'dist' ,
19
+ ext : '.min.js' ,
20
+ extDot : 'last'
21
+ } ]
22
+ }
23
+ } ,
24
+ } ) ;
25
+
26
+ // Load tasks
27
+ grunt . loadNpmTasks ( 'grunt-contrib-uglify' ) ;
28
+
29
+ // Default task.
30
+ grunt . registerTask ( 'default' , [ 'uglify' ] ) ;
31
+ } ;
Original file line number Diff line number Diff line change 37
37
}
38
38
},
39
39
"devDependencies" : {
40
+ "grunt" : " ~1" ,
41
+ "grunt-contrib-uglify" : " ~2" ,
42
+
40
43
"gulp" : " ~3" ,
41
44
"gulp-util" : " ~3" ,
42
45
"gulp-uglify" : " ~2" ,
You can’t perform that action at this time.
0 commit comments