From a71b2526f0f40206784a28153df4d698cf5f7f99 Mon Sep 17 00:00:00 2001 From: Alex Fedosov Date: Mon, 8 Jun 2015 14:28:45 +0600 Subject: [PATCH] update watchers --- gulp/tasks/loader.js | 2 +- gulp/tasks/watch.js | 13 ++++++++++--- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/gulp/tasks/loader.js b/gulp/tasks/loader.js index f8756c608..22ddc577d 100644 --- a/gulp/tasks/loader.js +++ b/gulp/tasks/loader.js @@ -14,5 +14,5 @@ gulp.task('loader', function () { .pipe(error.handle()) .pipe(replace(/__ORIGINAL_BASE_URL__/g, originalBaseUrl)) .pipe(gulpif(util.env.release, uglify())) - .pipe(gulp.dest('dist')) + .pipe(gulp.dest('dist')); }); diff --git a/gulp/tasks/watch.js b/gulp/tasks/watch.js index 697ed4901..42f8a232a 100644 --- a/gulp/tasks/watch.js +++ b/gulp/tasks/watch.js @@ -1,11 +1,10 @@ var gulp = require('gulp'); -var destCSS = require('../util/destCSS'); var runSequence = require('run-sequence'); gulp.task('watch', function () { gulp.watch('src/doc/**/*.*', ['doc']); - gulp.watch('assets/*.*', function () { + gulp.watch('assets/**/*', function () { runSequence('copyAssets', 'server'); }); @@ -24,5 +23,13 @@ gulp.task('watch', function () { runSequence('build', 'server'); }); - gulp.watch(['app.js', 'config.local.json'], ['server']); + gulp.watch(['app/index.js', 'config.local.json'], ['server']); + + gulp.watch('app/loader.js', function () { + runSequence('loader', 'server'); + }); + + gulp.watch('app/index.html', function() { + runSequence('copyIndexPage', 'server'); + }); });