aseemk / requireDir

Node.js helper to require() directories.
MIT License
484 stars 60 forks source link

any possibility for wildcard? #5

Closed Devric closed 6 years ago

Devric commented 9 years ago

need to require all folder named tasks

aseemk commented 9 years ago

We could potentially add something like that, but for now, a simple workaround would be to put all those folders in a tasks directory, and then you can just requireDir() that with recurse: true.

Does that help?

Devric commented 9 years ago

ya i wrote my own walk function to retrieve all tasks folders. can close this ticket if it aint in the plan.

yocontra commented 6 years ago

i added a generic filter function that should be out in the next release, you can use that in tandem with the recurse option to achieve this behavior