govuk-frontend
govuk-frontend copied to clipboard
Refactor watch task to remove Gulp
What
Update tasks/gulp/watch.js
to replace Gulp with our own watch script. This task is responsible for watching source code changes.
Why
We have made the decision to move away from Gulp and write our own build scripts.
Who needs to work on this
Developers
Who needs to review this
Developers
Done when
- [ ] tasks/gulp/watch.js no longer depends on Gulp
- [ ] docs/contributing/tasks.md has been updated
- [ ] watch.js has been relocated to tasks folder
Since the watch task relies on the gulp tasks styles
, sassdoc
and scripts
, I'm going to adjust its positioning in this work.
This issue was picked up in:
- https://github.com/alphagov/govuk-frontend/pull/3428
It's ready for review but we'll need to decide:
- Do we keep
gulp.watch()
and close this? - Do we replace
gulp.watch()
but keepgulp.parallel()
for logging (based on #3384 feedback) - Do we replace
gulp.watch()
with a better tool (Browsersync?) versus a like-for-like replacement
I'm inclined to do 1 or 3.
gulp.watch()
is a pretty core part of Gulp's functionality so I think 2 (deftly shown in #3428) feels like a step too far.
I vote we go with 1 for now and open an issue to investigate an alternative which we can pick up if we find the solution holds us back from anything.
Yeah, same. Now that we've decided to keeping logging via the Gulp CLI my vote goes on 1) too
Mainly because there's too much overhead trying to replicate glob-watcher used by gulp.watch()
Thanks @domoscargin