notifications-admin
notifications-admin copied to clipboard
Replace Gulp with Rollup
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, rungzipon css and js files instaticand compare sizes to prod