From 54bdc72ffa6d1685e738b15a83863bb1962ef7a3 Mon Sep 17 00:00:00 2001 From: kayone Date: Fri, 29 Aug 2014 21:32:09 -0700 Subject: [PATCH] gulp watch fix --- gulp/copy.js | 7 ++++--- gulp/jshint.js | 2 +- gulp/paths.js | 8 -------- gulp/watch.js | 2 +- 4 files changed, 6 insertions(+), 13 deletions(-) diff --git a/gulp/copy.js b/gulp/copy.js index 120bc5529..e5210bfc5 100644 --- a/gulp/copy.js +++ b/gulp/copy.js @@ -5,14 +5,15 @@ var cache = require('gulp-cached'); var paths = require('./paths.js'); gulp.task('copyJs', function () { - return gulp.src([paths.src.scripts]) - .pipe(cache()) + return gulp.src(paths.src.scripts) + .pipe(cache('copyJs')) + .pipe(print()) .pipe(gulp.dest(paths.dest.root)); }); gulp.task('copyIndex', function () { return gulp.src(paths.src.index) - .pipe(cache()) + .pipe(cache('copyIndex')) .pipe(gulp.dest(paths.dest.root)); }); diff --git a/gulp/jshint.js b/gulp/jshint.js index 16e5c8ee7..98e038b0f 100644 --- a/gulp/jshint.js +++ b/gulp/jshint.js @@ -7,7 +7,7 @@ var paths = require('./paths.js'); gulp.task('jshint', function () { return gulp.src([paths.src.scripts, paths.src.exclude.libs]) - .pipe(cache()) + .pipe(cache('jshint')) .pipe(jshint({ '-W030': false, '-W064': false, diff --git a/gulp/paths.js b/gulp/paths.js index 52a8e6c8d..4c65dd1f6 100644 --- a/gulp/paths.js +++ b/gulp/paths.js @@ -1,12 +1,4 @@ module.exports = { - js: [ - './app/**/*.js', - './src/**/*.js', - '!./**/libs/**', - '!./**/vendor/**', - '!./**/templates.js' - ], - src: { root: './src/UI/', templates: './src/UI/**/*.hbs', diff --git a/gulp/watch.js b/gulp/watch.js index 809c84936..eff7f023c 100644 --- a/gulp/watch.js +++ b/gulp/watch.js @@ -10,7 +10,7 @@ require('./less.js'); require('./copy.js'); -gulp.task('watch', ['jshint', 'handlebars', 'less', 'copyJs'], function () { +gulp.task('watch', ['jshint', 'handlebars', 'less', 'copyJs','copyIndex', 'copyContent'], function () { gulp.watch([paths.src.scripts, paths.src.exclude.libs], ['jshint', 'copyJs']); gulp.watch(paths.src.templates, ['handlebars']); gulp.watch([paths.src.less, paths.src.exclude.libs], ['less']);