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

Fix gulp watch task #6117

Merged
merged 1 commit into from
Jun 30, 2020
Merged

Conversation

lb-
Copy link
Member

@lb- lb- commented Jun 7, 2020

  • revise watch & task syntax for Gulp v4 requirements (regression from upgrading to v4)
  • to validate; run npm run start and make a change to a scss or js file - expectation is that the relevant build task should run and refreshing the browser should reflect that change

@squash-labs
Copy link

squash-labs bot commented Jun 7, 2020

Manage this branch in Squash

Test this branch here: https://lb-fixgulp-watch-v4-regression-9kqrr.squash.io

@zerolab
Copy link
Contributor

zerolab commented Jun 8, 2020

Kudos @lb- !

I did scratch my head at the en of last week when I needed to do some style changes and watch was not reacting.

Tried this locally and watch is back working again. It does, interestingly, start 9 threads of styles:sass when saving a single scss file. I wonder if that is by design or there's a tweak that can be made

@lb-
Copy link
Member Author

lb- commented Jun 8, 2020

Hmm. Good point. Maybe the series for each should be parallel, from what I read the old syntax would do series.

Not sure if this used to work the same with multiple threads of scams builds.

I also noticed it seems to take a while, 30s on my VM.

I have not had much experience with full config so not sure what else to try.

@zerolab

- revise watch & task syntax for Gulp v4 requirements
- ensure only one watcher gets created for file type paths
@lb- lb- force-pushed the fix/gulp-watch-v4-regression branch from b0095db to 900f16c Compare June 29, 2020 21:36
@lb-
Copy link
Member Author

lb- commented Jun 29, 2020

@zerolab can you give it another try, I have consolidated all the watchers that get generated, hopefully this will be better.

@zerolab
Copy link
Contributor

zerolab commented Jun 30, 2020

🎉 that does it!

$ npm run watch
...
[09:23:34] Finished 'build' after 3.61 s

// modify and save an scss file
[09:23:34] Starting '<anonymous>'...
[09:23:50] Starting 'styles:sass'...
[09:23:52] Wagtail CSS all files 143.84 kB
[09:23:52] Finished 'styles:sass' after 1.4 s

// undo change, save
[09:24:00] Starting 'styles:sass'...
[09:24:01] Wagtail CSS all files 143.84 kB
[09:24:01] Finished 'styles:sass' after 1.09

@zerolab zerolab merged commit 80f7db7 into wagtail:master Jun 30, 2020
@zerolab
Copy link
Contributor

zerolab commented Jun 30, 2020

Merged. Thank you @lb-

@lb-
Copy link
Member Author

lb- commented Jul 1, 2020

Awesome thanks @zerolab

@lb- lb- deleted the fix/gulp-watch-v4-regression branch July 19, 2020 03:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants