Skip to content
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

[MAINTENANCE] Evaluate Replacement for Gulp in UI Builds #803

Open
3 tasks
adambuttrick opened this issue Nov 26, 2024 · 1 comment
Open
3 tasks

[MAINTENANCE] Evaluate Replacement for Gulp in UI Builds #803

adambuttrick opened this issue Nov 26, 2024 · 1 comment
Labels

Comments

@adambuttrick
Copy link

adambuttrick commented Nov 26, 2024

Current State/Issue

The EZID front-end build pipeline relies on Gulp for tasks including:

  • SCSS compilation (with sourcemaps and PostCSS processing)
  • JavaScript linting, bundling, and minification
  • Image optimization and caching
  • File inclusion for HTML (e.g., <!--#include file="header.html"-->)
  • Starting a development server with live reload and SSI (via browsersync)
  • Running tasks such as cleaning directories, copying assets, and deploying to GitHub Pages

There are some challenges with this approach, specifically:

  1. Gulp dependencies not being actively maintained
  2. The UI and other CDL teams appear to have switched to other/more modern tooling alternatives

Desired State/Solution

Investigate migrating the build pipeline from Gulp to a more modern system, such as NPM scripts or a similar service, identify any package gaps or where custom build scripts would be necessary.

Tasks

  • Audit current Gulp tasks to identify all tasks/dependencies that would need replacement
  • Incrementally test replacement of each Gulp task with an equivalent NPM-based or similar script
  • Test full build process, verifying CSS and JS outputs
@sfisher
Copy link
Contributor

sfisher commented Dec 12, 2024

i believe for asset compilation (minifying CSS/Javascript, merging individual files into one, etc) there are some technologies such as Webpack and Vite. See https://pieces.app/blog/vite-vs-webpack-which-build-tool-is-right-for-your-project

I'm a tiny bit familiar with Webpack since Webpacker became popular in common Rails setups (Webpacker is a Ruby wrapper around the javascript Webpack library). I don't know much about Vite, but just that it's another popular alternative for compiling assets down into a more minified form that doesn't change too often and can be loaded once and reused from cache for subsequent page loads.

I believe these may be the most used NPM libraries for these particular kinds of tasks right now, though I'm not extremely up-to-date about these aspects. We can also check in with Joel H. to see if he has a way of working that he and other services are used to.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants