pull-stream / pull-glob

streaming extended glob
MIT License
7 stars 3 forks source link

Multiple globs (negation specifically) #1

Open yocontra opened 10 years ago

dominictarr commented 10 years ago

can you give an example of what the syntax would look like?

I'd be happy to take a pull request for this. At least making a pull-request with tests will make this much more likely to happen.

yocontra commented 10 years ago
glob(['./**/*.js', '!./node_modules/**/*.js']).pipe(log()) // glob all js files except vendor

Right now I have my own glob-stream module I'm going to implement this filter into but I will try to make some time to PR the feature into this lib as well so I can eventually switch to it.

dominictarr commented 10 years ago

okay, looking forward to your pull request.

ahdinosaur commented 8 years ago

i want this feature for the same use case, but i still need to wrap my head around what the code is doing... :smiley:

joakim commented 7 years ago

Would it be possible to rewrite this to use micromatch, or is that simply not possible due to what the code does (which I also have a hard time wrapping my head around 😄).

jamen commented 7 years ago

Just to chime in, I would like to use this for pull-vinyl, I suspect @joakim had same idea. :p

joakim commented 7 years ago

You read my mind :) I'm working on a local fork of your (otherwise great) module right now actually, using @contra's glob-stream + stream-to-pull-stream instead of pull-glob. It works, but it feels dirty to convert between node stream and pull stream, I'd prefer a 100% pull stream solution.

dominictarr commented 7 years ago

@joakim it would be very easy to have pull-glob support multiple globs with pull-cat! cat([glob(glob1), glob(glob2)]) etc. Maybe if glob is passed an array then it could just call to cat?