comparison Gruntfile.js @ 103:cc1f3b81364c

Better development mode: - Javascript files copied instead of being concatenated. - They have cache busting enabled again.
author Ludovic Chabant <ludovic@chabant.com>
date Wed, 06 Nov 2013 22:14:19 -0800
parents 13249e5ca51c
children f0172c5d8e2c
comparison
equal deleted inserted replaced
102:ea23c9483bc4 103:cc1f3b81364c
48 {expand: true, cwd: 'static/', dest: 'build/', src: ['img/*.{png,jpg,gif}']} 48 {expand: true, cwd: 'static/', dest: 'build/', src: ['img/*.{png,jpg,gif}']}
49 ] 49 ]
50 } 50 }
51 }, 51 },
52 copy: { 52 copy: {
53 images: { 53 development: {
54 files: [ 54 files: [
55 {expand: true, cwd: 'static/', dest: 'build/', src: ['img/**']} 55 {expand: true, cwd: 'static/', dest: 'build/', src: ['img/**']},
56 {expand: true, cwd: 'static/', dest: 'build/', src: ['js/**']},
57 {expand: true, cwd: 'static/', dest: 'build/', src: ['tpl/**']},
58 {expand: true, cwd: 'static/', dest: 'build/', src: ['bootstrap/js/*.js']}
56 ] 59 ]
57 }, 60 },
58 production: { 61 production: {
59 files: [ 62 files: [
60 {expand: true, cwd: 'static/', dest: 'build/', src: ['js/require.js']}, 63 {expand: true, cwd: 'static/', dest: 'build/', src: ['js/require.js']},
94 grunt.loadNpmTasks('grunt-contrib-imagemin'); 97 grunt.loadNpmTasks('grunt-contrib-imagemin');
95 grunt.loadNpmTasks('grunt-contrib-jshint'); 98 grunt.loadNpmTasks('grunt-contrib-jshint');
96 grunt.loadNpmTasks('grunt-contrib-watch'); 99 grunt.loadNpmTasks('grunt-contrib-watch');
97 100
98 // Default task(s). 101 // Default task(s).
99 grunt.registerTask('default', ['less:production', 'requirejs:production', 'imagemin:all', 'copy:production']); 102 grunt.registerTask('default', ['jshint', 'less:production', 'requirejs:production', 'imagemin:all', 'copy:production']);
100 103
101 // Other tasks. 104 // Other tasks.
102 grunt.registerTask('dev', ['less:development', 'requirejs:development', 'copy:production', 'copy:images']); 105 grunt.registerTask('dev', ['less:development', 'copy:production', 'copy:development']);
103 }; 106 };
104 107