From 2d831f7a460df07c92ba08afb8e86305bcd2bbfb Mon Sep 17 00:00:00 2001 From: Roman Gotsiy Date: Mon, 26 Oct 2015 20:21:09 +0200 Subject: [PATCH] Serve task: fixed issue with reload --- build/tasks/serve.js | 8 ++++++-- build/tasks/watch.js | 6 +++--- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/build/tasks/serve.js b/build/tasks/serve.js index 4c28ef26..93105d83 100644 --- a/build/tasks/serve.js +++ b/build/tasks/serve.js @@ -7,7 +7,11 @@ gulp.task('serve', ['watch'], function (done) { notify: false, port: 9000, server: { - baseDir: ['./demo', '.'] - } + baseDir: './demo', + routes: { + '/dist': './dist' + }, + }, + reloadDelay: 500 }, done); }); diff --git a/build/tasks/watch.js b/build/tasks/watch.js index a806c0da..4358c1cc 100644 --- a/build/tasks/watch.js +++ b/build/tasks/watch.js @@ -7,8 +7,8 @@ function changed(event) { } gulp.task('watch', ['build'], function () { - gulp.watch([ paths.source ], [ 'build', browserSync.reload ]).on('change', changed); - gulp.watch([ paths.html ], [ 'build', browserSync.reload]).on('change', changed); - gulp.watch([ paths.css ], [ 'build', browserSync.reload]).on('change', changed); + gulp.watch([ paths.source ], [ 'bundle', browserSync.reload ]).on('change', changed); + gulp.watch([ paths.html ], [ 'bundle', browserSync.reload]).on('change', changed); + gulp.watch([ paths.css ], [ 'bundle', browserSync.reload]).on('change', changed); gulp.watch([ paths.demo ], [ '', browserSync.reload ]).on('change', changed); });