Skip to content

Commit

Permalink
Fix crash of gulp-sass watch on errors like unclosed {
Browse files Browse the repository at this point in the history
  • Loading branch information
liorgrossman committed Jan 24, 2019
1 parent f895416 commit 2bf675c
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions gulpfile.js
Expand Up @@ -225,16 +225,20 @@ gulp.task('sass:cleanup', function() {
});

// Compile all SCSS files to CSS & map files
gulp.task('sass:compile', function() {
gulp.task('sass:compile', function() {
gulp.src(chromeDevelopmentDir + '/style/*.scss')
.pipe(sourcemaps.init())
.pipe(sass().on('error', sass.logError))
.pipe(sass().on('error', (err) => {
gutil.log(gutil.colors.yellow(err));
}))
.pipe(sourcemaps.write("./"))
.pipe(gulp.dest(chromeDevelopmentDir + '/style-css'));

gulp.src(chromeDevelopmentDir + '/themes/*.scss')
.pipe(sourcemaps.init())
.pipe(sass().on('error', sass.logError))
.pipe(sass().on('error', (err) => {
gutil.log(gutil.colors.yellow(err));
}))
.pipe(sourcemaps.write("./"))
.pipe(gulp.dest(chromeDevelopmentDir + '/themes-css'));
});
Expand Down

0 comments on commit 2bf675c

Please sign in to comment.