Skip to content
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

Add --ignore-watch option, pass --delay option from cmd.js, documentation. #65

Closed
wants to merge 1 commit into from

Conversation

STRML
Copy link

@STRML STRML commented Jun 28, 2014

--ignore-watch=glob (or {ignoreWatch: String|RegExp}) allows the user to cut down on used CPU / open file descriptors by ignoring watching of certain files. Useful for ignoring files you know should not change, like node_modules.

Fixes #11, and does not clobber the ignore option like #31.

@cggaurav
Copy link

+1

@zertosh
Copy link
Member

zertosh commented Mar 22, 2015

@STRML: I really like this. It seems that you were not only not adding watchers but you weren't caching ignored files. I think the value here is not attaching watchers but still caching.

I know this is almost a year later. If you don't have a use for this anymore, please let me know and I'll make the changes.

@zertosh
Copy link
Member

zertosh commented Mar 23, 2015

I think chokidar can handle this. Starting with chokidar@1.0.0 you can pass an ignored glob. If I'm understanding this correctly, then calling

chokidar.watch('/src/node_modules/react/lib/react.js', {ignored: '**/node_modules/**'});

still returns a chokidar instance, but it won't actually attach any fs watchers. chokidar instances are cheap, it's the fs watching that's expensive. @es128 can you confirm that this is chokidar's behavior across fs.watch / fs.watchFile / fsevents?

@es128
Copy link
Contributor

es128 commented Mar 23, 2015

@zertosh
Copy link
Member

zertosh commented Mar 23, 2015

Thanks @es128! Is a stable chokidar@1.0.0 in the near future? Or is it pretty safe/stable as it is right now?

@es128
Copy link
Contributor

es128 commented Mar 23, 2015

It is very stable as is, and I'm also on the verge of releasing 1.0.0.

There's a handful of open issues still, but no showstoppers.

@zertosh
Copy link
Member

zertosh commented Mar 23, 2015

Perfect, thanks again @es128.

@STRML How about a PR to bump chokidar and pass along an ignore-watch option as ignored to chokidar?

@zertosh
Copy link
Member

zertosh commented Mar 23, 2015

Sorry to bombard you @STRML - but going through the issue/PR backlog made me rethink this.

Closing and moving discussion to #162.

@zertosh
Copy link
Member

zertosh commented Mar 30, 2015

--ignore-watch (among other things) was added in #170 and published as 3.0.0.

@es128 We're now using chokidar 1.0.0-rc4. Awesome job on that!

@es128
Copy link
Contributor

es128 commented Mar 30, 2015

FYI rc5 is on the cusp of being published, and as long as nothing explodes, 1.0.0 in about a week

@zertosh zertosh mentioned this pull request Apr 9, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Option to ignore modules in node_modules
4 participants