-
Notifications
You must be signed in to change notification settings - Fork 168
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
Gaze.prototype._addToWatched repeating readDir of same directory on each call #214
Comments
This is what it seems it should be, but I'm not familiar with all use cases:
|
Hey! Thanks for diving into this. As long as all the tests pass with |
My pleasure, but unfortunately I ran npm test and did see a slew of errors like below. I fear it may be because I am on a PC with reduced admin rights, a dated version of node (0.12.7), and am behind a firewall, (aka developer heaven). Example:
Should I proceed with the PR and lean on you to do a real npm test? |
…ame directory on each call
Hi, I ran into the same issue as @smithwib. Making a fix, I doubt if the test is correct. This line bothers me: The problem I see here is that we didn't add sub dir into the watch list. The test adds folders Project (LO) and nested only. This may have unpleasant side-effects. For example, gaze is used in metalsmith-watch library. Metalsmith is a static website generator written in Node.JS. Common folder structure is
You configure to watch for changes in src folder and gaze also starts monitoring node_modules folder as well. Is it an expected behavior? @shama Kyle, what do you think? |
Has this been solved? |
Is there a reason that sub folders are scanned and added to the watch list when a single file is specified to be watched and not a file glob that could potentially include sub-folders? This is causing issues in hyper where only a single file should be watched. I added the following issue in the hyper repo: There are a number of issues being raised in hyper that are directly related to the fact that gaze is scanning sub-folders in a users |
Thanks for the module - super cool.
We're running into a delay when a project site got past a couple dozen files and headed into the hundreds, we noticed the processing time was taking longer and longer -- minutes. In debugging, I focused in on this:
When supplied a glob like ./data/data.json, it set dirname = ./data (the parent folder), and then it readdirSync that directory and added its subdirectories to the watchlist.
Two strange things:
Can you help?
The text was updated successfully, but these errors were encountered: