Skip to content

Commit 0ede1af

Browse files
committed
fix(watch): fixed rebuilding CSS on SASS change
1 parent 3ddcbc7 commit 0ede1af

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

gulpfile.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,8 @@ gulp.task('watch', ['styles:sass', 'scripts:lint', 'scripts:cacheTpls', 'assets:
293293
});
294294

295295
// watch for SASS changes
296-
gulp.watch(config.paths.sass, ['styles:sass:imports'], function (event) {
296+
var sassWatcher = gulp.watch(config.paths.sass, ['styles:sass:imports']);
297+
sassWatcher.on('change', function (event) {
297298
if (event.path.lastIndexOf('.scss') === event.path.length - 5) {
298299
var files = config.build + '/assets/' + pkg.name + '-' + pkg.version + '.scss';
299300
return fnSass(files).pipe(plugins.livereload(server));

0 commit comments

Comments
 (0)