From 72ea30db43903d8a129b7159863aa063429ce7a1 Mon Sep 17 00:00:00 2001 From: tomaioo Date: Wed, 1 Jul 2026 05:17:20 -0700 Subject: [PATCH] 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> --- gulpfile.js | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/gulpfile.js b/gulpfile.js index 2e873ced..4721667a 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -1,16 +1,15 @@ // Less configuration -var gulp = require('gulp'); -var less = require('gulp-less'); -var sourcemaps = require('gulp-sourcemaps'); +const gulp = require('gulp'); +const less = require('gulp-less'); +const sourcemaps = require('gulp-sourcemaps'); -gulp.task('less', function (cb) { - gulp.src('styles/daggerheart.less') +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')); - cb(); }); gulp.task(