Repository navigation
refactor(gulp): modernize build pipeline and streamline dependencies - #4759
Conversation
|
Important Review skippedReview was skipped as selected files did not have any reviewable changes. ⛔ Files ignored due to path filters: 1
⚙️ Run configuration
⛔ Files ignored due to path filters: 1
You can disable this status message by setting the Use the checkbox below for a quick retry:
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Merge Risk: ⚪ Minimal · up to
|
f6eb92a to
bb846bc
Compare
- Replace third-party Gulp plugins (gulp-clean, gulp-run, gulp-rename, stream-series, readable-stream) with native Node.js APIs (node:fs/promises, node:child_process, node:stream) - Streamline Bootswatch 3 and 5 theme copies using glob patterns and exclusion lists instead of repetitive streams - Refactor menubar icon copying to use a mapped configuration array with fs.copyFile - Add injectOptions helper to standardize gulp-inject marker configuration - Remove obsolete and unneeded dependencies (coffeescript, es6-promise, gulp-debug, gulp-gzip, gulp-header) - Update dependencies (bootstrap-table, dompurify, jquery-ui-dist, jquery-validation, jspdf-autotable, license-report, npm-check-updates) - Reorganize gulpfile.js into structured task groups and optimize task concurrency in default and compress pipelines
bb846bc to
5f14248
Compare
Summary
Modernizes
gulpfile.jsby replacing outdated Gulp wrapper plugins with modern native Node.js APIs (node:fs/promises,node:child_process,node:stream), deduplicates repetitive asset copy tasks, safely removes 10 obsolete packages, updates frontend vendor dependencies, and reorganizes the build file into 5 structured task groups.Motivation
The existing Gulp build script relied on multiple 10+ year-old wrapper plugins and repetitive stream chains. The goal of this PR is to modernize the build tooling to use native Node.js standard library capabilities, drop unneeded packages, and update current dependencies where possible, while ensuring generated asset bundles remain 100% functionally identical to
master.Package Audit: Why Packages Could Safely Be Removed or Updated
1. Removed Packages
gulp-clean: Replaced with native Node.jsfs.rm('./public/resources', { recursive: true, force: true })vianode:fs/promises. Eliminates an unneeded external wrapper.gulp-run: Replaced with nativenode:child_process(promisify(exec)), removing fragile shell stream wrappers.stream-series: Replaced with a clean nativePassThroughstream sequencer helper (streamSeries) usingnode:stream, avoiding an external package for sequential Vinyl stream piping.gulp-rename: File copying tasks now calculate destinations directly or copy files to exact target paths usingfs.copyFile.readable-stream: Was a legacy polyfill for Node.js stream implementations in older Node versions. Modern Node.js (18+) has native WHATWG and stream promises built-in.coffeescript: Completely unused legacy dependency. There is not a single.coffeefile in the entire repository.es6-promise: An obsolete polyfill for Internet Explorer 11. OSPOS does not support IE11, and modern browsers have nativePromise.gulp-debug,gulp-gzip,gulp-header: Diagnostic or unused packaging plugins with zero usage in the active build pipeline.2. Updated Dependencies
bootstrap-table(^1.23.5^1.27.3): Minor version upgrades providing sticky header, column formatting, and responsive rendering bugfixes.dompurify(^3.4.16^3.4.17): Patch update providing DOM XSS sanitization security fixes with a 100% backward-compatible API.jquery-ui-dist(^1.12.1^1.13.3): Security and compatibility fixes for UI widgets (autocomplete, datepicker).jquery-validation(^1.19.5^1.22.1): Minor update with validation regex and browser compatibility updates.jspdf-autotable(^5.0.7^5.0.9): Patch update fixing table layout and pagination quirks in PDF export generation.license-report&npm-check-updates: Tooling updates for license compilation and dependency auditing.Structural Improvements in
gulpfile.jsBOOTSWATCH5_EXCLUDED_THEMES).MENUBAR_ICONS) using nativefs.copyFilein parallel withPromise.all.injectOptions(tag, options)to eliminate repetitive{ addRootSlash: false, ignorePath: '/public/', starttag: '...' }boilerplate across tasks.master. No application views are touched in this PR.How to Verify
# Clean and build all production and debug assets npm run buildSummary by CodeRabbit