fvtt-cthulhu-eternal/gulpfile.js

38 lines
979 B
JavaScript
Raw Permalink Normal View History

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');
};
/* ----------------------------------------- */
/* 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))
.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;