Coder Social home page Coder Social logo

Comments (4)

HerringtonDarkholme avatar HerringtonDarkholme commented on June 2, 2024

The problem is I don't have handle to Vinyl objects after parsing dependencies in files. Using readSync is more generic

from gulp-progeny.

c-vetter avatar c-vetter commented on June 2, 2024

In module.exports of index.js you resolve the path and forward it until it reaches parseDeps in parse.js – which is where you have your call to fs.readFileSync. You could just as easily forward the Vinyl handle instead of the path and read the contents from that.

Using readSync is more generic

That is correct. It's also unnecessary since this is a gulp plugin and gulp –and, by extension, your code– relies on Vinyl objects. Additionally you introduce a problem that gulp wants to get around in the first place. One of gulp's main advantages over grunt is that it uses stream and thereby drastically reduces file-system access, which is one of the main bottle-necks of grunt. You may want to read up on this point here: https://github.com/substack/stream-handbook#why-you-should-use-streams

from gulp-progeny.

HerringtonDarkholme avatar HerringtonDarkholme commented on June 2, 2024

Pull request is welcome

from gulp-progeny.

c-vetter avatar c-vetter commented on June 2, 2024

For anybody interested, check this out: https://www.npmjs.com/package/gulp-inheritance

from gulp-progeny.

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.