-
Notifications
You must be signed in to change notification settings - Fork 58
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
Exclude function needs better docs or changes #31
Comments
Good idea! I will make it more clear in the docs. Also in this example: let x = new fdir()
.glob(elmJsonGlob)
.exclude(
(dir) =>
dir.startsWith(".") ||
dir === "node_modules" ||
dir === "elm-stuff",
)
.crawl(".")
.sync();
|
Are you sure? I actually debugged into it and saw those example paths. It's not I think changing the api would be better, most usecases probably just want to match the next folder we're traversing into, not the complete path. If that's possible at all. |
Yeah, I was thinking the same. I will make the changes. |
https://github.com/thecodrr/fdir/blob/master/documentation.md#excludefunction
Seems to suggest, that you only match on the deepest folder, but it doesn't it seems to hand you the complete path to match on. It also seems to change depending on other parameters.
this will lead to
dir
in theexclude
function being something like./path/.git/file
this will lead to
dir
in theexclude
function being something likehome/razze/Development/elm-pages-starter/node_modules/chalk
on linuxI feel like that would at least need to be pointed out.
The text was updated successfully, but these errors were encountered: