-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Allow to unwatch files with LiveReloadServer
#2777
Conversation
LiveReloadServer
LiveReloadServer
Hmm by looking at the dependent pull request, I finally understand the problem that this tries to solve. To not give false hope that this can skip sub-paths of existing directories (the method doesn't even error in case it finds no match!), I think we should instead directly expose the result of |
I looked into it more, and actually found it a bad experience to use those watch references directly. And it didn't even solve what I was trying to solve. The main problem I was trying to avoid is for a plugin to accidentally unwatch paths that it didn't watch in the first place. |
Try it out if it works for you |
It works, thank you! 👍🏼 |
I'm working on a project that needs to watch files being served based in the content on other files. I've not found a way to stop watching files for changes. As far as I know, I can't access the watch object returned by
observer.schedule
needed to unwatch them, so crafted thisunwatch
method for the server.Is working as expected in my local environment (Ubuntu 20.04). Mentioning @oprypin as creator and maintainer of the new livereload server.