Skip to content

Conversation

@jonchurch
Copy link
Member

@jonchurch jonchurch commented Nov 19, 2025

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: >=24 and the nvmrc to 24

I dropped a few minor gulp tasks:

  • the app-icon job due to there just being no good modern gulp-responsive option that I found. Instead I generated the files we needed and checked them in.
  • json minify - there's no JSON in the jekyll output

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:

  • Dropped the app-icon build job
  • removed the icon.js file which was config for the icon build job
  • I generated the icons we use (apple-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.svg
  • I removed the browerconfig.xml file which declared icons for windows start menu tiles, a Microsoft Metro design feat from windows 8

Gulp core upgrade:

  • Upgraded gulp from 3.9.1 → 5.0.1
  • Migrated task syntax from dependency arrays to gulp.series() and gulp.parallel()
  • Removed gulp-sequence (functionality now built into Gulp)
  • Reordered task definitions (minify tasks before build tasks that reference them)

Plugin replacements:

  • Replaced gulp-purifycssgulp-purgecss v7.0.2
  • Replaced gulp-uglify + gulp-babelgulp-terser v2.1.0
  • Consolidated all JS minification (including service worker) to use Terser

Plugin upgrades:

  • gulp-htmlmin 3.0.0 → 5.0.1
  • gulp-imagemin 3.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 needed
  • gulp-jsonmin - no JSON files in build output
  • gulp-babel / babel-preset-babili - replaced by Terser
  • gulp-cli - bundled with Gulp 5

Context

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.

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
@netlify
Copy link

netlify bot commented Nov 19, 2025

Deploy Preview for lodash ready!

Name Link
🔨 Latest commit 2fa3837
🔍 Latest deploy log https://app.netlify.com/projects/lodash/deploys/691e053c5e1d350008e1b057
😎 Deploy Preview https://deploy-preview-299--lodash.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@jonchurch
Copy link
Member Author

jonchurch commented Nov 19, 2025

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 ¯\_(ツ)_/¯

We can't merge this until we set the netlify node version up to 24. Im guessing the preview will crash out because of that

@ljharb
Copy link
Member

ljharb commented Nov 19, 2025

It'd be great to drop gulp entirely, too.

@jonchurch
Copy link
Member Author

jonchurch commented Nov 19, 2025

Yeah that's next step, but for now this is the near minimal change to get local dev working again

jonchurch

This comment was marked as outdated.

Copy link
Member

@UlisesGascon UlisesGascon left a 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.

@UlisesGascon UlisesGascon added the STA-2025 Issues and tasks related to the work funded by STA for Q4 2025. label Nov 19, 2025
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)
@jonchurch
Copy link
Member Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

STA-2025 Issues and tasks related to the work funded by STA for Q4 2025.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants