mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-07-22 10:29:54 +02:00
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>
This commit is contained in:
parent
1af86d87bb
commit
72ea30db43
1 changed files with 5 additions and 6 deletions
11
gulpfile.js
11
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(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue