From 2cae7ab76d1c3d4de66dc1914f5c65af98bdfa2a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20Daubensch=C3=BCtz?= Date: Fri, 29 May 2015 12:08:26 +0200 Subject: [PATCH] add scss files to browser-sync --- gulpfile.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/gulpfile.js b/gulpfile.js index 520d729c..c306aab0 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -17,7 +17,7 @@ gulp.task('build', function() { bundle(false); }); -gulp.task('serve', ['browser-sync', 'sass', 'copy'], function() { +gulp.task('serve', ['browser-sync', 'sass:watch', 'copy'], function() { bundle(true); }); @@ -35,7 +35,12 @@ gulp.task('sass', function () { .pipe(sourcemaps.init()) .pipe(sass().on('error', sass.logError)) .pipe(sourcemaps.write('./maps')) - .pipe(gulp.dest('./build/css')); + .pipe(gulp.dest('./build/css')) + .pipe(browserSync.stream());; +}); + +gulp.task('sass:watch', function () { + gulp.watch('./sass/**/main.scss', ['sass']); }); gulp.task('copy', function () {