B
B
beegrowth2017-01-26 16:01:45
JavaScript
beegrowth, 2017-01-26 16:01:45

Running gulp after an error?

Good afternoon! I have the following question.
At the moment, my gulpfile is configured in such a way that when an error occurs, it knocks out (as if I pressed CTRL + C) and in order to run it again, you need to enter the gulp command, for example.
And the question is ... how in this case, after I have corrected all the errors, launch it with the CTRL + S command?
I will be grateful for your help!

Answer the question

In order to leave comments, you need to log in

2 answer(s)
Олег, 2017-01-26
@beegrowth

Установите gulp-plumber, чтобы не заниматься подобной ерундой.

Z
zooks, 2017-01-26
@zooks

function handleError(err) {
  console.log(err.toString());
  this.emit('end');
}

gulp.task('styles', function() { //gulp-sass
      return gulp.src('_/components/sass/*.sass')
        .pipe(sass({ style: 'expanded' }))
        .on('error', handleError)
        .pipe(gulp.dest('public_html/assets/css'))
});

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question