-
Notifications
You must be signed in to change notification settings - Fork 167
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
Why Gaze watches all directories if I watch only a single file? #174
Comments
Since |
@shama So when it says it's watching those directories, what exactly is it watching? And what will it trigger if a file in those directories is aded/updated? I'm just getting some "too many watched files" kind of messages when I run several projects simultaneously and I though it might be related. Also, is there a way to tell it to watch just that one file without all those directories? |
It should only watch each folder, not all files within the folder. If you're on OSX, the default open file limit is very low, The version of gaze packaged with grunt-contrib-watch uses a combination of native and stat polling. So if you're getting EMFILE, it's likely one of your projects might be watching |
Related to #45.
Test case
Using
grunt-contrib-watch
to watch a single file.Gruntfile.js:
Executing:
grunt --verbose
Result:
As mentioned in #45,
Gaze.prototype._addToWatched
is adding all those dirs to thethis._watched
array for some reason, even though I'm watching only a single file.I"ve tried changing the pattern to
'./index.html'
but it didn't work as well.So, what is the purpose of adding all of those dirs?
Is it a bug? If not, how to restrict the watch list?
It sure isn't the expected behavior.
The text was updated successfully, but these errors were encountered: