-
Notifications
You must be signed in to change notification settings - Fork 59
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 option to exclude files based on regular expression #86
Conversation
I should probably have made a new branch for that...
Is this likely to get merged or should I publish a fork? |
Exclusions are likely to be merged. Globbing will not.
…On 27 Jun. 2017 12:21 pm, "Marcel Robitaille" ***@***.***> wrote:
Is this likely to get merged or should I publish a fork?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#86 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AAjZWPYFX8WoBN7gtCsanmnzJrXy7_2Zks5sIGdEgaJpZM4OClFb>
.
|
Do you mind if I publish my fork on npm then? |
If you wish :) |
FWIW this implementation isn't complete. It's important to also do the exclusion when determine the ancestors and descendants. You'd also probably want to cache the regex check in the constructor to avoid doing it many times. |
I didn't want to check ancestors and descendants because I assumed the usual use case would be What do you mean by caching the regex check? You mean |
Something like that? |
Not dealing with ancestors and descendants will mean that if a file imports a file from |
If files and/or directories are being excluded there should be no way for those exclude to appear in the graph. |
That makes sense. Is what I suggested the best way to do that? |
The regex caching is better. You'll still need to prevent exclude files being referenced in as ancestors and descendants. |
I'll write some tests I guess. |
Please remove package-lock.json |
Sure thing. BTW you should have write access, no? |
I do but I'm mostly catching up whilst in bed. Open source isn't my day job :) |
This is looking good, thanks for your time. I have some performance concerns, but they can be address separately. I'll get this released in the next day or so. |
readme.md
Outdated
@@ -82,6 +82,13 @@ Default: `false` | |||
|
|||
Follow symbolic links. | |||
|
|||
#### excludes |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The option is exclude, not excludes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oops
Yeah it's true that it checks a lot of regexes but idk how to avoid that. |
Any update on this? |
What are we waiting on? I'd like to make my fork after this has been merged. |
Thanks @Iambecomeroot. Apologies for the delay I've be occupied with other projects. |
* Add support for import globbing * Add test for import globbing * Update readme for import globbing option * Forgot semis * Fix spread on old node versions * Add option to exclude files matching regex * Remove changes made in other pr I should probably have made a new branch for that... * Cache RegExp check * Check ancestors descendants * I should run tests before pushing... * Add tests * Remove package-lock.json * Fix typo in readme
I wanted to exclude
/node_modules/
.