From 7f8ae15565c644627e837a82f39205bdfbc5a432 Mon Sep 17 00:00:00 2001 From: Dillon Ngo Date: Sat, 27 Dec 2025 15:29:11 +0800 Subject: [PATCH] 1688 PO Automation Project --- gulpfile.js | 6 +++--- package.json | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/gulpfile.js b/gulpfile.js index 988f6cc5..13f1d052 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -6,10 +6,10 @@ const plugins = require('gulp-load-plugins')({ lazy: true, postRequireTransforms: { print: (plugin) => plugin.default, - uglifyEs: (plugin) => plugin.default, - if: (plugin) => plugin.default + uglifyEs: (plugin) => plugin.default } }); +const gulpIf = require('gulp-if'); const onError = (error) => { fancyLog(error); @@ -108,7 +108,7 @@ gulp.task('sourceJs', () => { return gulp.src(pkg.globs.sourceJs) .pipe(plugins.plumber({ errorHandler: onError })) .pipe(plugins.print()) - .pipe(plugins.if( + .pipe(gulpIf( file => !sourceJsKeepNames.includes(path.basename(file.path)), plugins.concat('site.js') )) diff --git a/package.json b/package.json index bc43aab1..95f9b7ad 100644 --- a/package.json +++ b/package.json @@ -48,6 +48,7 @@ "gulp-concat": "^2.6.1", "gulp-concat-css": "^3.1.0", "gulp-copy": "^4.0.1", + "gulp-if": "^3.0.0", "gulp-livereload": "^4.0.2", "gulp-load-plugins": "^2.0.6", "gulp-newer": "^1.3.0",