changeset 125:886f36b05e5f

More optimized `watch` mode for `grunt`.
author Ludovic Chabant <ludovic@chabant.com>
date Sun, 24 Nov 2013 14:04:05 -0800
parents 6c261cb94631
children 9079fb01abb8
files Gruntfile.js
diffstat 1 files changed, 16 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/Gruntfile.js	Sat Nov 23 13:35:37 2013 -0800
+++ b/Gruntfile.js	Sun Nov 24 14:04:05 2013 -0800
@@ -58,6 +58,16 @@
           {expand: true, cwd: 'static/', dest: 'build/', src: ['bootstrap/js/*.js']}
         ]
       },
+      dev_scripts: {
+        files: [
+          {expand: true, cwd: 'static/', dest: 'build/', src: ['js/wikked.js', 'js/wikked/**']}
+        ]
+      },
+      dev_templates: {
+        files: [
+          {expand: true, cwd: 'static/', dest: 'build/', src: ['tpl/**']}
+        ]
+      },
       production: {
         files: [
           {expand: true, cwd: 'static/', dest: 'build/', src: ['js/require.js']},
@@ -72,8 +82,12 @@
     },
     watch: {
       scripts: {
-        files: ['static/js/**/*.js', 'static/tpl/**/*.html'],
-        tasks: ['jshint', 'copy:development']
+        files: ['static/js/wikked.js', 'static/js/wikked/**'],
+        tasks: ['jshint:all', 'copy:dev_scripts']
+      },
+      templates: {
+        files: ['static/tpl/**/*.html'],
+        tasks: ['copy:dev_templates']
       },
       styles: {
         files: ['static/css/**/*.less'],