-
Notifications
You must be signed in to change notification settings - Fork 90
fix the gulp build toolchain for modern node #299
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
lockfile version upgrade came with
gulp bundles its own cli now
no need for gulp-sequence, must use builtins gulp.series, gulp.parallel tasks must be defined before they are used
purgecss is the successor apparently to purifycss some options were dropped, namely it will no longer log out the removed selectors as it was previously configured to do via the removed: true option
✅ Deploy Preview for lodash ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
Edit: dang, i was wrong, it builds just fine even with the new deps and old node, which is surprising to me! So we can likely merge, but lets do it when folks are online @UlisesGascon @jdalton in case we bork the site by accident somehow
|
e2e95e4 to
ad57f89
Compare
|
It'd be great to drop gulp entirely, too. |
|
Yeah that's next step, but for now this is the near minimal change to get local dev working again |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work @jonchurch! I think we can land it if the visual errors are minimal and you prefer to work on that on a separate PR.
there just doesnt seem to be a modern supported version of gulp-responsive, and building these outdated app icons are not high value. we do miss out on 32x32 favicon for those whos browsers would use it, and the apple homescreen icon, but eh
update package-lock node engines (reran npm i after change in pkgjson)
we can just get by with the svg these days
…n html" This reverts commit ad57f89.
8568baf to
5daf337
Compare
|
I fixed the spacing issue, was a sequencing issue w/ the css build job and the html/js build job. We had dropped some selectors from the homepage. |
This PR Upgrades the Gulp-based build system to allow us to build the site on modern node versions. It's a fairly conversative approach, as I didnt update all our deps in this pass. No need to mix that into this PR IMO, dep PRs suck to review and rollback so kept this focused.
it sets
engines: >=24and the nvmrc to 24I dropped a few minor gulp tasks:
Otherwise I kept things as focused on getting what already was here running again in modern node.
Changes
Updates Gulp from v3 to v5 and modernizes all related plugins to work with Node.js 22+. Previously stuck on Node 11 due to deprecated dependencies.
Icon Tweaks:
icon.jsfile which was config for the icon build jobapple-touch-180x180.png, favicon-32x32.png, favicon-16x16.png, chrome-launcher-144x144.png, android-home-192x192.png, android-splash-512x512.png, safari-pinned-tab-16x16.svg) from icon.svgbrowerconfig.xmlfile which declared icons for windows start menu tiles, a Microsoft Metro design feat from windows 8Gulp core upgrade:
gulpfrom 3.9.1 → 5.0.1gulp.series()andgulp.parallel()gulp-sequence(functionality now built into Gulp)Plugin replacements:
gulp-purifycss→gulp-purgecssv7.0.2gulp-uglify+gulp-babel→gulp-terserv2.1.0Plugin upgrades:
gulp-htmlmin3.0.0 → 5.0.1gulp-imagemin3.3.0 → 7.1.0 (last CommonJS version before ESM migration)Removed dependencies:
gulp-responsive- broken Sharp bindings on Node 18+, app icon generation no longer neededgulp-jsonmin- no JSON files in build outputgulp-babel/babel-preset-babili- replaced by Tersergulp-cli- bundled with Gulp 5Context
The site is a jekyll static site, but has a gulp step to do bundling/minification and some other build tasks.
That gulp based toolchain was stuck on node <12 due to outdated deps that would crash beyond that (graceful-fs in the dep tree, hard crash on 12+), and the gulp-responsive plugin just seems stuck on an old version of Sharp, so node-gyp was not pleased with my apple silicon nor the modern node versions.