Commit 9cd28b9e authored by Robert Lyon's avatar Robert Lyon Committed by Gerrit Code Review

Merge "Bug 1855373: Gulp update to v4"

parents 4ed42ffe 6f7b1aca
// Include gulp
var gulp = require('gulp-help')(require('gulp'));
var gulp = require('gulp');
//Polyfill so we don't need >= node 0.12
require('es6-promise').polyfill();
......@@ -22,7 +22,7 @@ themes = themes.map(function(themepath){
});
// Turn sass into css
gulp.task('css', 'Compile SASS into CSS', function () {
async function css () {
var tasks = themes.map(function(themepath){
console.log("Compiling CSS for " + themepath);
......@@ -40,12 +40,13 @@ gulp.task('css', 'Compile SASS into CSS', function () {
});
return es.concat.apply(null, tasks);
});
};
// Watch Files For Changes
gulp.task('watch', 'Watch style directories and auto-compile CSS', function() {
gulp.watch('htdocs/theme/*/sass/**/*.scss', ['css']);
});
function watch() {
gulp.watch('htdocs/theme/*/sass/**/*.scss', gulp.series('css'));
}
gulp.task('css', css);
gulp.task('watch', watch);
// Default Task (recompile on init before watching)
gulp.task('default', ['css', 'watch']);
gulp.task('default', gulp.series(css, watch));
\ No newline at end of file
......@@ -12,15 +12,14 @@
"es6-promise": "^4.2.4",
"event-stream": "3.3.4",
"globule": "^1.0.0",
"gulp": "<=3.9.1",
"gulp": "^4.0.2",
"gulp-autoprefixer": "^5.0.0",
"gulp-clean-css": "^3.0.2",
"gulp-help": "^1.6.1",
"gulp-if": "^2.0.2",
"gulp-sass": "^4.0.1",
"node-sass": "<=4.8.3",
"node-sass": "^4.13.0",
"path": "^0.11.14",
"yargs": "^11.0.0"
"yargs": "^15.1.0"
},
"devDependencies": {},
"scripts": {
......
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