govuk-frontend icon indicating copy to clipboard operation
govuk-frontend copied to clipboard

Refactor watch task to remove Gulp

Open domoscargin opened this issue 2 years ago • 1 comments

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

domoscargin avatar Jul 20 '22 08:07 domoscargin

Since the watch task relies on the gulp tasks styles, sassdoc and scripts, I'm going to adjust its positioning in this work.

domoscargin avatar Aug 15 '22 11:08 domoscargin

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:

  1. Do we keep gulp.watch() and close this?
  2. Do we replace gulp.watch() but keep gulp.parallel() for logging (based on #3384 feedback)
  3. Do we replace gulp.watch() with a better tool (Browsersync?) versus a like-for-like replacement

colinrotherham avatar Mar 31 '23 10:03 colinrotherham

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.

domoscargin avatar Apr 11 '23 16:04 domoscargin

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

colinrotherham avatar Apr 11 '23 16:04 colinrotherham