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
I'm using watch to run build commands when files are changed.
The process takes a while, so if I refresh the browser before it completes I still get back the old files.
This can be confusing because it keeps tricking me into thinking my changes didn't work.
I want to create a middleware for connect to delay requests while watch tasks are running. Looking at the code, it appears watch already has internal events that fire when tasks start and stop.
I would like to expose these events by either passing them up through grunt, or exposing a way to specify callbacks in the watch config. I believe this functionality could be useful in other situations other then my own.
Is that a feature that could be easily added, or would be possible to merge if I wrote it myself?
Thanks!
The text was updated successfully, but these errors were encountered:
Some people have been using live reload, but it's not something we have set-up out of box for everyone.
The build process can take a while after files are saved. People not used to live reload still switch to the browser and expect to see their changes right away after the refresh.
We've been using the events in a forked version and it's helped reduce the confusion.
Let me know if you have any other concerns or things I can help with!
That sounds more like a training issue than a technical one. Just tell them the page will automatically reload once its ready to. Or do something to speed up the time between changes going in and the build finishing.
I'm using watch to run build commands when files are changed.
The process takes a while, so if I refresh the browser before it completes I still get back the old files.
This can be confusing because it keeps tricking me into thinking my changes didn't work.
I want to create a middleware for connect to delay requests while watch tasks are running. Looking at the code, it appears watch already has internal events that fire when tasks start and stop.
https://github.com/gruntjs/grunt-contrib-watch/blob/master/tasks/watch.js#L31-L46
I would like to expose these events by either passing them up through grunt, or exposing a way to specify callbacks in the watch config. I believe this functionality could be useful in other situations other then my own.
Is that a feature that could be easily added, or would be possible to merge if I wrote it myself?
Thanks!
The text was updated successfully, but these errors were encountered: