M
M
MRcracker2017-08-26 20:55:55
Layout
MRcracker, 2017-08-26 20:55:55

Gulp how to disable compilation process stop on errors in sass?

Hello, how can I make it so that when errors appear in sass files during work, gulp does not stop the work process, but only notifies about it in the console, while browser-sync and other plugins work?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
dom1n1k, 2017-08-26
@dom1n1k

I don't know if this will completely solve the problem, but for me it's like this:

gulp.task('styles', function () {
  return gulp.src('less/styles.less')
    .pipe(less())
    .on('error', function (err) {
      console.log(err);
      this.emit('end');
    })
    .pipe(autoprefixer({
      browsers: ['> 0.5%', 'last 3 versions'],
    }))
    .pipe(gulp.dest('css/'));
});

S
sergey, 2017-08-26
@zorro76

Read about gulp-plumber

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question