daggerheart/gulpfile.js
tomaioo 72ea30db43 refactor: missing sem declarations in gulpfile.js
The gulpfile.js uses `var` instead of `const` or `let` for variable declarations, which is an outdated practice. Additionally, the callback `cb` in the 'less' task is called before the asynchronous gulp stream operations complete, which can lead to race conditions where the task reports completion before the Less compilation finishes.

Signed-off-by: tomaioo <203048277+tomaioo@users.noreply.github.com>
2026-07-01 05:17:20 -07:00

21 lines
548 B
JavaScript

// Less configuration
const gulp = require('gulp');
const less = require('gulp-less');
const sourcemaps = require('gulp-sourcemaps');
gulp.task('less', function () {
return gulp.src('styles/daggerheart.less')
.pipe(sourcemaps.init())
.pipe(less())
.on('error', console.error.bind(console))
.pipe(sourcemaps.write('.'))
.pipe(gulp.dest('styles'));
});
gulp.task(
'default',
gulp.series('less', function (cb) {
gulp.watch('styles/**/*.less', gulp.series('less'));
cb();
})
);