More grunt biz.
authorCameron Ball <cameron@getapproved.com.au>
Wed, 10 Dec 2014 07:29:21 +0000 (15:29 +0800)
committerCameron Ball <cameron@getapproved.com.au>
Wed, 10 Dec 2014 07:29:21 +0000 (15:29 +0800)
Gruntfile.js
package.json

index 8d16cbb..554fb1e 100644 (file)
@@ -9,7 +9,7 @@ module.exports = function (grunt) {
             main: {
                 expand: true,
                 cwd: 'app/',
-                src: ['**', '!js/**', '!lib/**', '!**/*.css', '!**/*.js', '!**/bower_components/**', '!**/nbproject/**', '!npm-debug.log'],
+                src: ['**', '!js/**', '!lib/**', '!**/*.example', '!**/*.css', '!**/*.js', '!**/bower_components/**', '!**/nbproject/**', '!npm-debug.log'],
                 dest: 'dist/'
             },
             shims: {
@@ -19,6 +19,11 @@ module.exports = function (grunt) {
                 dest: 'dist/js/shims'
             }
         },
+
+       cleanempty: {
+               options: {},
+               src: ['dist/**']
+       },
  
         rev: {
             files: {
@@ -49,9 +54,10 @@ module.exports = function (grunt) {
     grunt.loadNpmTasks('grunt-contrib-uglify');
     grunt.loadNpmTasks('grunt-rev');
     grunt.loadNpmTasks('grunt-usemin');
+    grunt.loadNpmTasks('grunt-cleanempty');
  
     // Tell Grunt what to do when we type "grunt" into the terminal
     grunt.registerTask('default', [
-        'copy', 'useminPrepare', 'concat', 'uglify', 'cssmin', 'rev', 'usemin'
+        'copy', 'cleanempty', 'useminPrepare', 'concat', 'uglify', 'cssmin', 'rev', 'usemin'
     ]);
 };
index d0b133a..0864888 100644 (file)
@@ -19,7 +19,8 @@
     "grunt-usemin": "~2.0.2",
     "grunt-contrib-copy": "~0.5.0",
     "grunt-rev": "~0.1.0",
-    "grunt-contrib-clean": "~0.5.0"
+    "grunt-contrib-clean": "~0.5.0",
+    "grunt-cleanempty": "~1.0.0"
   },
   "scripts": {
     "postinstall": "bower install",