diff --git a/build/tasks/serve.js b/build/tasks/serve.js index 20bc49d..3d77ed9 100644 --- a/build/tasks/serve.js +++ b/build/tasks/serve.js @@ -1,11 +1,11 @@ - import gulp from 'gulp'; import util from 'gulp-util'; import browserSync from 'browser-sync'; import runSequence from 'run-sequence'; import modRewrite from 'connect-modrewrite'; +import paths from '../paths'; -function browerSync(directoryBase, files, browser) { +function startBrowserSync(directoryBase, files, browser) { browser = browser === undefined ? 'default' : browser; files = files === undefined ? 'default' : files; @@ -25,5 +25,8 @@ function browerSync(directoryBase, files, browser) { } gulp.task('serve', () => { - return browerSync(['public', './' ]); -}); \ No newline at end of file + startBrowserSync([paths.srcDir, './' ]); + gulp.watch(`${paths.srcDir}/**/*.scss`, ['sass', () => { + browserSync.reload(); + }]); +});