-
Notifications
You must be signed in to change notification settings - Fork 69
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
Sane no longer populating dirRegistry on ready
event?
#39
Comments
It should still be there if you're using the NodeWatcher class. However, it's an internal property and maybe missing if you're using other watching backends (e.g. watchman) |
The property is there in NodeWatcher, but it only has directories, not the actual found files. |
Oh man... I just went through the history and realized how far behind my dependency actually was. |
I'd had to hack together a sane-specific implementation of Gaze's |
My root and globs are
|
Huh... If I completely remove the glob option, sane behaves as before. Perhaps |
dirRegistery has always been about registries. Sane doesn't keep a record of files watched, because it doesn't watch files and that's part of what makes it performant. The only way to check if the file is watched, is to check if it's directory is in dirRegistery and then check if satisfies the globs. However, if you want this to be a supported feature and not break in the future, let's make it into a |
I really do, an I do this at the moment in https://github.com/RupertJS/stassets/blob/master/lib/Watchers/Asset/mirror.coffee#L112-L142 The user story is that there is a glob of files which will immediately be compiled, and will be recompiled any time there is a change. I call it a mirror here, because watching the files isn't actually a useful thing. Having an always up to date list of the current files is the important piece. |
In 0.5.4, I could walk the watcher.dirRegistry to see what files had already been found when
ready
fired. Is this no longer the case?The text was updated successfully, but these errors were encountered: