38 lines
980 B
JavaScript
Raw Normal View History

2025-02-09 17:50:40 +01:00
const gulp = require('gulp');
const less = require('gulp-less');
function onError(err) {
util.log(util.colors.red.bold('[ERROR LESS]:'),util.colors.bgRed(err.message));
this.emit('end');
};
/* ----------------------------------------- */
/* Compile LESS
/* ----------------------------------------- */
function compileLESS() {
return gulp.src("less/foundryvtt-reve-de-dragon.less")
.pipe(less()).on('error',console.log.bind(console))
.pipe(gulp.dest("./css"))
}
const css = gulp.series(compileLESS);
/* ----------------------------------------- */
/* Watch Updates
/* ----------------------------------------- */
const SIMPLE_LESS = ["less/*.less"];
function watchUpdates() {
gulp.watch(SIMPLE_LESS, css);
}
/* ----------------------------------------- */
/* Export Tasks
/* ----------------------------------------- */
exports.default = gulp.series(
gulp.parallel(css),
watchUpdates
);
exports.css = css;
exports.watchUpdates = watchUpdates;