Merge pull request #32 from bryankang/css-on-exit
Prevent exiting on css error
This commit is contained in:
commit
81c3f9d380
|
@ -21,6 +21,7 @@ gulp.task("build-preview", ["css", "js", "hugo-preview"]);
|
||||||
gulp.task("css", () => (
|
gulp.task("css", () => (
|
||||||
gulp.src("./src/css/*.css")
|
gulp.src("./src/css/*.css")
|
||||||
.pipe(postcss([cssImport({from: "./src/css/main.css"}), cssnext()]))
|
.pipe(postcss([cssImport({from: "./src/css/main.css"}), cssnext()]))
|
||||||
|
.on("error", swallowError)
|
||||||
.pipe(gulp.dest("./dist/css"))
|
.pipe(gulp.dest("./dist/css"))
|
||||||
.pipe(browserSync.stream())
|
.pipe(browserSync.stream())
|
||||||
));
|
));
|
||||||
|
@ -63,3 +64,8 @@ function buildSite(cb, options) {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function swallowError(error) {
|
||||||
|
console.error(error.toString());
|
||||||
|
this.emit("end");
|
||||||
|
}
|
||||||
|
|
Reference in New Issue