As an optional feature in globby. It was a really difficult thing to implement, so would be nice if everyone could take advantage of and help improve it.
@marionebl @schnittstabil Thoughts?
As far as I know node-glob does not support advanced _ignore patterns_ (like functions for examples, see https://github.com/isaacs/node-glob/issues/261), hence we would only move the problem to globby鈥搘ithout any advantage, at least with the current getGitIgnoreFilter approach.
This does not solve any technical issues per se as @schnittstabil mentions but I think globby is the better package to host that concern. :+1:. I'll draft a PR for globby.
@schnittstabil The advantage is that more projects would benefit from the code and help improve it. I need it for multiple other projects that are already using globby.
@sindresorhus Which other projects are you planning to use this in?
@marionebl AVA
That sounds reasonable :+1:
@sindresorhus I had more than one look at this and frankly am quite lost on how to do this in a way to improve on the current performance in a meaningful way. Perhaps you have an idea?
@marionebl It's not about directly improving the performance, but rather moving it to a place where more projects can take advantage of the code, which makes it more likely to see performance fixes.
@marionebl https://github.com/sindresorhus/xo/issues/235 is about improving performance.
Ok, get it.
It's now included in the Globby, so the next step would be to take advantage of it here: https://github.com/sindresorhus/globby/releases/tag/v7.0.0
Had a brief look at this. We might want to expose getGitIgnoreFilter from globby to deal with the lintText use case in xo:
https://github.com/sindresorhus/xo/blob/4273f8aa24b4c4dc2383d64e53d496f2e020481f/index.js#L65
As it stand we'd duplicate quite a lot of the gitignore logic otherwise.
Thoughts?
馃憤 Good idea
Most helpful comment
This does not solve any technical issues per se as @schnittstabil mentions but I think globby is the better package to host that concern. :+1:. I'll draft a PR for globby.