I’m using sass with ionic, but whenever I get an error with the sass compiler, it breaks everything, making me have to restart ionic serve
So I just added this into the gulp file, and now it gives a neat error and aborting, instead of breaking everything
var errorAlert;
gulp.task("sass", function(done) {
gulp.src("./scss/ionic.app.scss")
.pipe(sass())
.on("error", errorAlert)
.pipe(gulp.dest("./www/css/"))
.pipe(minifyCss({
keepSpecialComments: 0
}))
.pipe(rename({ extname: ".min.css" }))
.pipe(gulp.dest("./www/css/"))
.on("end", done);
});
errorAlert = function(err) {
console.log(err.toString());
this.emit("end");
};