rschmukler / gulp-insert

string mutation library for gulp
MIT License
61 stars 6 forks source link

gulp plugin conventions #1

Closed jeromew closed 10 years ago

jeromew commented 10 years ago

Hello,

If you feel like it, could you please follow the plugin conventions laid out here: https://github.com/gulpjs/gulp/blob/master/docs/writing-a-plugin/dealing-with-streams.md

it would be nice if gulp-insert could support streams.

Thanks

rschmukler commented 10 years ago

@jeromew I am open to this. I am curious though, what is your usecase with a stream based implementation? Ie. what plugin are you sourcing it with and what are you trying to achieve with it?

jeromew commented 10 years ago

@rschmukler I am just trying to push the gulp ecosystem to have streams as a first-order type when possible. As a temp solution I developed https://www.npmjs.org/package/gulp-buffer and https://www.npmjs.org/package/gulp-stream to handle the type mismatch between plugins.

regarding gulp-insert at this stage I did a quick copy of the gulp-prefixer example on the documentation page so I do not absolutely need that you modify your plugin.

overall I try to avoid filesystem access when possible and reduce memory consumption so streams have great characteristics for that.

nfroidure commented 10 years ago

:+1: for fixing this issue. Tell me if you agree, i'll PR you if i have free time.

rschmukler commented 10 years ago

@nfroidure will definitely merge a PR that adds stream support.

rschmukler commented 10 years ago

Closed by #3