11module . exports = function ( grunt ) {
22 grunt . initConfig ( {
33 pkg : grunt . file . readJSON ( 'package.json' ) , // the package file to use
4-
4+
55 uglify : {
66 files : {
7- expand : true ,
8- flatten : true ,
7+ expand : true ,
8+ flatten : true ,
99 src : 'src/js/*.js' ,
1010 dest : 'dist' ,
1111 ext : '.min.js'
@@ -32,18 +32,17 @@ module.exports = function(grunt) {
3232 } ,
3333
3434 copy : {
35- main : {
35+ main : {
3636 files : [
37- // copy dist to tests
38- // { expand: true, cwd: 'dist', src: '*', dest: 'tests/lib/' },
37+ // setup tests
3938 { expand : true , cwd : 'src/css' , src : '*' , dest : 'tests/lib/' } ,
4039 { expand : true , cwd : 'src/js' , src : '*' , dest : 'tests/lib/' } ,
41- // copy latest libs to tests
42- { expand : true , cwd : 'public/bower_components/jquery' , src : 'jquery.js' , dest : 'tests/lib/' } ,
43- { expand : true , cwd : 'public/bower_components/bootstrap-datepicker/js' , src : 'bootstrap-datepicker.js' , dest : 'tests/lib/' } ,
44- // copy src to example
40+ { expand : true , cwd : 'node_modules/jquery/dist' , src : 'jquery.js' , dest : 'tests/lib/' } ,
41+ // setup public
4542 { expand : true , cwd : 'src/css' , src : '*' , dest : 'public/css/' } ,
46- { expand : true , cwd : 'src/js' , src : '*' , dest : 'public/js/' }
43+ { expand : true , cwd : 'src/js' , src : '*' , dest : 'public/js/' } ,
44+ { expand : true , cwd : 'node_modules/bootstrap/dist/' , src : '**/*' , dest : 'public/libs/bootstrap/' } ,
45+ { expand : true , cwd : 'node_modules/jquery/dist/' , src : '*' , dest : 'public/libs/jquery' }
4746 ]
4847 }
4948 }
@@ -57,6 +56,6 @@ module.exports = function(grunt) {
5756 grunt . loadNpmTasks ( 'grunt-contrib-copy' ) ;
5857
5958 // register one or more task lists (you should ALWAYS have a "default" task list)
60- grunt . registerTask ( 'default' , [ 'uglify' , 'cssmin' , 'copy' , 'qunit' , 'watch' ] ) ;
59+ grunt . registerTask ( 'default' , [ 'uglify' , 'cssmin' , 'copy' , 'qunit' , 'watch' ] ) ;
6160 grunt . registerTask ( 'test' , 'qunit' ) ;
6261} ;
0 commit comments