mihneadb / node-directory-tree

Convert a directory tree to a JS object.
MIT License
523 stars 106 forks source link

Allow multiple excludes #38

Closed dp-1a closed 6 years ago

dp-1a commented 6 years ago

Hi,

would it be possible to add the possibility to specify multiple excludes and extensions?

I´m currently trying to parse nodejs/typescript projects and they often contain a lot of "metadata" which I would like to ignore. For example I would like to ignore node_modules and an output folder like dist.

Basically make the exclude option accept an array of regexes...

Thx

mihneadb commented 6 years ago

Hi, sounds good, feel free to submit a PR!

Thanks!

david-j-davis commented 6 years ago

Is this live? When I install I'm getting directory-tree version 2.0. This feature returns an error when I use it: TypeError: options.exclude.test is not a function.

dp-1a commented 6 years ago

Hi, looking at the PR again - this feature should only be available with 2.1.0. With 2.0.0 this feature is not active.

david-j-davis commented 6 years ago

Right, and 2.1.0 isn't available to install on npm.

On Wed, Mar 14, 2018, 1:14 AM dp-1a notifications@github.com wrote:

Hi, looking at the PR again - this feature should only be available with 2.1.0. With 2.0.0 this feature is not active.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/mihneadb/node-directory-tree/issues/38#issuecomment-372937972, or mute the thread https://github.com/notifications/unsubscribe-auth/ADVg75lQCTsa3UxFFNVI3BccF7Rf-R7bks5teNFigaJpZM4QrYqD .

dp-1a commented 6 years ago

True, but that is something which @mihneadb needs to take care of :)

david-j-davis commented 6 years ago

Ok. @mihneadb, greatly appreciate this npm package. Any plan to update npm with the latest package?

mihneadb commented 6 years ago

Sorry about that, answered on the issue. Published.