M
M
Matvey Kremnin2017-01-29 15:53:37
Less
Matvey Kremnin, 2017-01-29 15:53:37

How to make sure that if there is an error in the LESS file, Task watch does not crash out of the console and then continues to work after fixing it?

Everything works, but when I write an error in the LESS file, it shows me where the error is and immediately crashes, I need to restart it with a new one. What do I need to do so that it shows an error, but then continues to work after fixing it.
Thanks

var gulp = require('gulp');
var less = require('gulp-less');

gulp.task('less', function(){
  return gulp.src('./less/**/*.less')
    .pipe(less())
    .pipe(gulp.dest('css'))
});

gulp.task('watch', function() {
    gulp.watch('./less/**/*.less', ['less']);
});

gulp.task('default', ['watch']);

Answer the question

In order to leave comments, you need to log in

1 answer(s)
O
Oleg, 2017-01-29
@Smith46

gulp plumber

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question