gulp-plumber: Not working with gulp-sass
My terminal still returns an error and breaks my task when there’s an error in my Sass. This is what my task looks like:
gulp.task('sass', function() {
return gulp.src(['./src/scss/*.scss', './src/scss/**/*.scss'])
.pipe(plumber())
.pipe(sass({
includePaths : [
'./lib/basscss/scss',
'./lib/fluidbox/css'
],
outputStyle: 'expanded'
}))
.pipe(prefix({
browsers: ['last 2 versions'],
cascade: false
}))
.pipe(minifyCSS())
.pipe(gulp.dest('./_site/public/css'))
.pipe(gzip())
.pipe(gulp.dest('./_site/public/css'))
.pipe(reload({stream: true}))
});
Any idea why it keeps breaking? Any help is appreciated. Thanks in advance!
About this issue
- Original URL
- State: open
- Created 9 years ago
- Reactions: 3
- Comments: 17 (1 by maintainers)
@holic You’re right! @realph keep code but remove return.
gulp.task(‘sass’, function() { gulp.src(…) .pipe(plumber()) .pipe(sass({…})); });
@joshtoo I got it to work this way:
would that do the trick?
@TheAggressive
@realph Try calling gulp-sass with
sass.sync
instead ofsass
.See https://github.com/dlmanning/gulp-sass/wiki/Common-Issues-and-Their-Fixes#gulp-watch-stops-working-on-an-error for an explanation.