Closed brendanfalkowski closed 5 years ago
The last hurdle to getting this working is resolving this issue, which causes the watch
to stop recognizing changes in a JS file after an error is encountered:
https://github.com/gulpjs/gulp/issues/359
issue/1-update-to-gulp-4
npm install
gulp watch
js/src/module/thing.js
Note — in gulpfile.js
only the function jsThing()
doesn't use createJsModule()
which was meant to improve readability when dozens of modules exist in the build (all JS bundling tasks are the same). Retaining this is far less important making the watcher work after finding errors.
I think the issue lies in the return types, so I was trying to isolate the code for just one of the bundle creators when testing changes. I just couldn't find the right mix to keep the watcher working for JS (it does work for CSS).
Merged fixes in from: https://github.com/gravitydepartment/frontend-starter/pull/2
Gulp 4 docs: https://gulpjs.com/docs/en/getting-started/quick-start