2024-12-04 00:11:23 +01:00
|
|
|
const gulp = require('gulp');
|
|
|
|
const less = require('gulp-less');
|
|
|
|
|
2025-01-08 17:26:57 +01:00
|
|
|
function onError(err) {
|
|
|
|
util.log(util.colors.red.bold('[ERROR LESS]:'),util.colors.bgRed(err.message));
|
|
|
|
this.emit('end');
|
|
|
|
};
|
|
|
|
|
2024-12-04 00:11:23 +01:00
|
|
|
/* ----------------------------------------- */
|
|
|
|
/* Compile LESS
|
|
|
|
/* ----------------------------------------- */
|
|
|
|
function compileLESS() {
|
|
|
|
return gulp.src("styles/fvtt-cthulhu-eternal.less")
|
2025-01-08 17:26:57 +01:00
|
|
|
.pipe(less()).on('error',console.log.bind(console))
|
2024-12-04 00:11:23 +01:00
|
|
|
.pipe(gulp.dest("./css"))
|
|
|
|
}
|
|
|
|
const css = gulp.series(compileLESS);
|
|
|
|
|
|
|
|
/* ----------------------------------------- */
|
|
|
|
/* Watch Updates
|
|
|
|
/* ----------------------------------------- */
|
|
|
|
const SIMPLE_LESS = ["styles/*.less"];
|
|
|
|
|
|
|
|
function watchUpdates() {
|
|
|
|
gulp.watch(SIMPLE_LESS, css);
|
|
|
|
}
|
|
|
|
|
|
|
|
/* ----------------------------------------- */
|
|
|
|
/* Export Tasks
|
|
|
|
/* ----------------------------------------- */
|
|
|
|
|
|
|
|
exports.default = gulp.series(
|
|
|
|
gulp.parallel(css),
|
|
|
|
watchUpdates
|
|
|
|
);
|
|
|
|
exports.css = css;
|
2024-12-17 15:47:36 +01:00
|
|
|
exports.watchUpdates = watchUpdates;
|