-
-
Notifications
You must be signed in to change notification settings - Fork 483
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 multi glob functionality for inclusion/exclusion #84
Comments
Dupe of #36 |
Check out globby
I still think this should be built into node-glob though. |
👍 to getting this into node-glob |
This is what I did to get a temporary version to work: function globArray(patterns, options) {
var i, list = [];
if (!Array.isArray(patterns)) {
patterns = [patterns];
}
patterns.forEach(function (pattern) {
if (pattern[0] === "!") {
i = list.length-1;
while( i > -1) {
if (!minimatch(list[i], pattern)) {
list.splice(i,1);
}
i--;
}
}
else {
var newList = glob.sync(pattern, options);
newList.forEach(function(item){
if (list.indexOf(item)===-1) {
list.push(item);
}
});
}
});
return list;
} Maybe you could do something similar initially, just to get some level of support. |
need 👍 |
Every implementation right now just globs everything and then checks the negations afterwards. When dealing with something like this |
I'm willing to personally put up $500 for a fix for this - not sure if I should do a bountysource or whatever to make that official |
@contra in #36, it was stated this would not be added to the package. Use https://github.com/sindresorhus/globby, keep your $500 and buy yourself a beer. |
@jonathandelgado globby has inherent perf issues as @contra has already stated.
As far as I can see, @isaacs has only stated that it was "complicated and hard", not that he would never accept a PR nor change his mind in 2 years. |
I've put up some stuff on bountysource for this and a few other issues on node-glob if anyone is interested |
I don't want to add multi-glob functionality, per se, but I do think it's reasonable to add an |
See: #115 (comment) |
like
as globs do
The text was updated successfully, but these errors were encountered: