-
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
Test for creating file in subdirectories #103
base: master
Are you sure you want to change the base?
Conversation
These tests were for specific cases handled by private methods that have now been removed and therefore these tests should be removed.
Just a note, it cant fix EMFILE errors for file watchers but it will help mitigate EMFILE errors with other file operations, ie readdir.
This is a tricky one. Since the pattern Some options we have:
|
Option 2 sounds most like the "expected behaviour" to me. Perhaps make it opt-in to alleviate the wastefulness? gaze('**/*.js', { matchEmptyDirs: true }, function() { }); |
I would like #2, with lukehorvat's suggestion if the wastefullness becomes an issue (this is happening in development environments, not production). |
Option 2 sounds like the thing. You could use "!" in the glob to exclude specific subdirs. |
I, too, would like to see the second option. It's rather impractical to use gulp tools such as gulp-watch without this functionality! |
👍 to see this merged. |
👍 |
@floatdrop Sure. This 👍 meant to go for option 2 in @shama's post above. |
I agree with @nmagerko - watching for new files should be considered an essential feature... |
+1 especially annoying with gulp-watch |
+1 for option 2. I would expect / to match any files that could ever potentially match that pattern. |
@shama any progress on this? Can I help? |
Thanks for the offer! All my focus right now is on getting https://github.com/shama/navelgazer integrated as it will make implementing option 2 above much easier and fix a number of other issues. Testing and reporting issues on navelgazer would be much appreciated. |
// 所以在/js/vendor與js/lib/寫一個_.js來進行第一次觸發, 如果資料夾有檔案後就可以將此js刪除 // bug report: shama/gaze#103
Since it's been a while since this was last updated, just curious if any progress has been made on handling new files/directories? |
@brian428 Feel free to check out the navelgazer branch for progress. I'll be continuing to work on that branch until it's stable. Although I think @floatdrop and eventually gulp are switching to chokidar. It uses fsevents which watches entire folder trees so it doesn't have this limitation. They've also just recently added file patterns. So definitely worth checking out if this issue is a big problem for you now. |
Hi. Turns out, that if you have empty subfolder - it will not be watched by gaze. Steps for manual reproducing are in this issue.
Test in patch actually hangs, because
add
event in not emitted.