notifications-admin icon indicating copy to clipboard operation
notifications-admin copied to clipboard

Replace Gulp with Rollup

Open kr8n3r opened this issue 1 year ago • 0 comments

What

Replace Gulp, its tasks with Rollup and unmaintained tools.

Why

Gulp generally still works well for traditional (non single-page web apps, however plugins used have either been

  • deprecated (like gulp-add-src)
  • don't support newer versions of dependencies so we can't resolve vulnerabilities ( like gulp-better-rollup and https://github.com/alphagov/notifications-admin/pull/5226)
  • use tools that have become unmaintained (like sass-lint Sass Lint)

We could have either searched for newer plugins, integrated Rollup directly into gulp tasks or rewritten our build steps to reduce reliance on 3rd party plugins.

Instead of integrating Rollup directly into gulp tasks, this PR replaces Gulp with Rollup entirely. Additionally in replaces SassLint and JSHint with ESLint and Stylelint which are already in use at GDS.

Test and review

  • Run locally. export NODE_ENV="production"; to test production build
  • See individual commits for details
  • To compare gziped file size against production, run gzip on css and js files in static and compare sizes to prod

kr8n3r avatar Oct 04 '24 13:10 kr8n3r