You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This seems to be caused by a combination of 2 factors:
The library that grunt-contrib-watch uses to watch for file changes listens at the directory level rather than a per-file basis. Therefore when we register the watch task for our Gruntfile.js file, it's actually watching for changes in the entire root project folder but still only responding to changes that involve the Gruntfile.js file.
There's a (still unresolved) bug in grunt-contrib-watch that triggers the watch task whenever a new folder is added to a directory that's being watched. That's why you observed the "watch" task getting triggered when .nyc_output and coverage were added. You would not see the "watch" task triggered if those folders existed at the point "watch" was first run, nor when a file inside of either of those folders changed.
There's a PR to fix the issue described in bullet point 2, but it's been open since 2016. There hasn't been activity in grunt-contrib-watch since May 2018, so not sure what the odds are of getting a PR accepted.
As best as I can tell, we likely have the same behavior in every other project that we use Grunt, grunt-contrib-watch, and watch Gruntfile.js.
Should we just close this and move on @jthomerson? Or do you recommend something else?
Let's leave our issue open (it is an issue), but not do anything about it. If anyone knows some Grunt people to ping, let's try that. It's a bit ridiculous that those issues are open that long and don't have any feedback or activity.
With
grunt develop
running, when I runnpm test
I see the following:It seems like we should not be watching the
.nyc_output
orcoverage
folders.The text was updated successfully, but these errors were encountered: