Code Monkey home page Code Monkey logo

Comments (12)

UltCombo avatar UltCombo commented on July 16, 2024

When faced with the same issue, I've moved all source files to a src subdirectory (sibling of node_modules), then you can just use a simple src/**/*.js glob.

from glob-stream.

phated avatar phated commented on July 16, 2024

Don't glob things under node_modules. Remove the **

from glob-stream.

yocontra avatar yocontra commented on July 16, 2024

Negation is done post-read right now which is kind of crappy. the node-glob module which we use to find results does not accept multiple globs, so there is no way for us to negate prior to that. If we switch to a new glob module or that module adds support for negation it will speed things up a ton. Really, this is probably one of the biggest bottlenecks in gulp.

from glob-stream.

UltCombo avatar UltCombo commented on July 16, 2024

@contra should we still support regex (post-read) filtering after implementing node-glob's ignore option?

from glob-stream.

yocontra avatar yocontra commented on July 16, 2024

@UltCombo Yeah I think so

from glob-stream.

UltCombo avatar UltCombo commented on July 16, 2024

Alright then, I'll have a PR in 30~45mins.

from glob-stream.

yocontra avatar yocontra commented on July 16, 2024

@UltCombo Any update on this?

from glob-stream.

UltCombo avatar UltCombo commented on July 16, 2024

@contra #40 (comment)

from glob-stream.

thirdcreed avatar thirdcreed commented on July 16, 2024

nearly have a working PR for this, there's one test broken:
'should return a file name stream with dotfiles negated'
and it's timing out at 2000ms.

Any thoughts on what that might be, for some reason the stream is not emitting anything.
https://github.com/thirdcreed/glob-stream/blob/master/index.js

from glob-stream.

thirdcreed avatar thirdcreed commented on July 16, 2024

Even when I set the timeout for that test to 15 seconds, it doesn't emit. It runs in like <1 sec when using glob.sync. So I know something's up.

node -p 'require("glob").sync("/home/thirdcreed/Projects/glob-stream/test/fixtures/*swag",{ignore:["/home/thirdcreed/Projects/glob-stream/test/fixtures/**"],dot:true,cwd: "/home/thirdcreed/Projects/glob-stream/test",cwdbase:false,nonull:false})'

That returns [ ], like it should. The ignore actually works, whereas random text in the ignore would allow .swag in, the above command does not; those are the exact parameters being sent into glob.Glob();

The ignore code is 8 days old, so it could be a bug in there, I'm starting to dive in, but any kind of expertise here would be much appreciated. Thanks!

from glob-stream.

luengnat avatar luengnat commented on July 16, 2024

any update to this issue? I encounter a similar problem without negation though.

from glob-stream.

yocontra avatar yocontra commented on July 16, 2024

I think this is the same as another ticket - the ** is being expanded by recursing the fs (this is how globs work). Using !node_modules instead of !node_modules/** should fix it.

from glob-stream.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.