F
F
freeman02042018-09-08 12:12:45
gulp.js
freeman0204, 2018-09-08 12:12:45

How to configure gulp in this way?

It is necessary to remove the automatic opening of the tab when starting gulp and if an error is made in the scss syntax so that gulp does not immediately crash and show an error. It may show an error, but not crash.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergiu Mitu, 2018-09-08
@freeman0204

to prevent gulp from crashing use gulp-plumber

const plumber = require('gulp-plumber'), //(prevent gulp from exit)

const plumberOptions = {
  handleError: function (err) {
    console.log(err);
    this.emit('end');
  }
};

.pipe(plumber(plumberOptions))

and I don’t even know to open a tab, I use browsersync, it automatically opens the tab.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question