Commit b6b081f4 authored by revolutionary-bench's avatar revolutionary-bench
Browse files

Update gulpfile to work with new, strict Gulp 4 req.

Gulp 4 now requires more strict handling of possible async
tasks, so now tasks must return promises or otherwise signal when
done.

See:
https://www.liquidlight.co.uk/blog/article/how-do-i-update-to-gulp-4/
parent bb4491d3
......@@ -19,7 +19,7 @@ gulp.task('sass', function() {
// Minify the CSS
gulp.task('minify-css', function () {
gulp.task('minify-css', function (done) {
gulp.src(config.buildStylesDir + '/*.css') // path to your file, e.g. 'build/stylesheets/main.css'
.pipe(cleanCss({debug: true}, (details) => {
console.log(`${details.name}: Original Size: ${details.stats.originalSize}`);
......@@ -29,6 +29,7 @@ gulp.task('minify-css', function () {
suffix: '.min'
})) // include .min in the filename, e.g. 'main.min.css'
.pipe(gulp.dest(config.minDir));
done();
});
......@@ -41,4 +42,6 @@ gulp.task('watch', function() {
// Default Task(s):
// Run all of these when calling `gulp default`
gulp.task('default', ['sass', 'minify-css']);
gulp.task('default', gulp.series('sass', 'minify-css', function(done) {
done();
}));
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment