Serve task: fixed issue with reload

This commit is contained in:
Roman Gotsiy 2015-10-26 20:21:09 +02:00
parent c7bc6ff391
commit 2d831f7a46
2 changed files with 9 additions and 5 deletions

View File

@ -7,7 +7,11 @@ gulp.task('serve', ['watch'], function (done) {
notify: false, notify: false,
port: 9000, port: 9000,
server: { server: {
baseDir: ['./demo', '.'] baseDir: './demo',
} routes: {
'/dist': './dist'
},
},
reloadDelay: 500
}, done); }, done);
}); });

View File

@ -7,8 +7,8 @@ function changed(event) {
} }
gulp.task('watch', ['build'], function () { gulp.task('watch', ['build'], function () {
gulp.watch([ paths.source ], [ 'build', browserSync.reload ]).on('change', changed); gulp.watch([ paths.source ], [ 'bundle', browserSync.reload ]).on('change', changed);
gulp.watch([ paths.html ], [ 'build', browserSync.reload]).on('change', changed); gulp.watch([ paths.html ], [ 'bundle', browserSync.reload]).on('change', changed);
gulp.watch([ paths.css ], [ 'build', browserSync.reload]).on('change', changed); gulp.watch([ paths.css ], [ 'bundle', browserSync.reload]).on('change', changed);
gulp.watch([ paths.demo ], [ '', browserSync.reload ]).on('change', changed); gulp.watch([ paths.demo ], [ '', browserSync.reload ]).on('change', changed);
}); });