Skip to content
This repository has been archived by the owner on Sep 1, 2022. It is now read-only.

more helpful replacement pointers #146

Closed
Spongman opened this issue Feb 16, 2018 · 8 comments
Closed

more helpful replacement pointers #146

Spongman opened this issue Feb 16, 2018 · 8 comments

Comments

@Spongman
Copy link

please add some more helpful replacement pointers to the README.

for example, noop points to through2 as a replacement, but it doesn't mention how to use through2 to do this and it's not immediately clear from the through2 docs how to do this.

please add some simple translations of the examples in the 'Usage' section to the recommended replacements.

@demurgos
Copy link
Member

demurgos commented Feb 16, 2018

@Spongman
noop is equivalent to () => through2.obj(). I agree it could be clearer. If you don't use the return value, an empty function should be enough. Calling noop returns a pass-through stream in object mode.

I'll take some time during the week-end to compile a list of examples of common cases I encountered while helping other modules to migrate.

@CodeMan99
Copy link

How about suggesting gulp-noop (github)?

Personally I'd prefer that a PassThrough stream was used directly, but I suppose it is implementation details.

@CodeMan99
Copy link

CodeMan99 commented Feb 24, 2018

I am a bit confused by the suggestion to replace gutil.buffer with list-stream. Seems like the more well known bl or concat-stream would be more applicable.

Edit: Oh, I guess bl does not support objectMode, making it a non-starter.

@katekourbatova

This comment has been minimized.

@CodeMan99
Copy link

CodeMan99 commented Apr 20, 2018

@katekourbatova You are reading this issue incorrectly. This is about improving suggestions for changing plugins using gulp-util. The case you are displaying is that gulp-decompress needs to follow this advice.

Tools should not be replacing whole plugins because they in turn depend on gulp-util. The proper thing to do is have gulp-decompress replace their usage of gulp-util (which is already done kevva/gulp-decompress@d3fdff1).

So for this case specifically, someone in the dependency chain needs to upgrade a version so that a newer version of gulp-decompress is used.

@CodeMan99
Copy link

@katekourbatova In fact, it looks like gatsby-plugin-sharp@next solves your issue (though for some reason npm install is still showing the gulp-util deprecation notice, not sure why).

@IbrahemElanany
Copy link

gutil.File => https://www.npmjs.com/package/vinyl
gutil.replaceExtension => The .extname property on Vinyl objects or https://www.npmjs.com/package/replace-ext
gutil.colors => https://www.npmjs.com/package/ansi-colors
gutil.date => https://www.npmjs.com/package/date-format
gutil.log => https://www.npmjs.com/package/fancy-log
gutil.template => https://www.npmjs.com/package/lodash.template
gutil.env => https://www.npmjs.com/package/minimist
gutil.beep => https://www.npmjs.com/package/beeper
gutil.noop => https://www.npmjs.com/package/through2
gutil.isStream => Use the .isStream() method on Vinyl objects
gutil.isBuffer => Use the .isBuffer() method on Vinyl objects
gutil.isNull => Use the .isNull() method on Vinyl objects
gutil.linefeed => Use the string '\n' in your code
gutil.combine => https://www.npmjs.com/package/multipipe
gutil.buffer => https://www.npmjs.com/package/list-stream
gutil.PluginError => https://www.npmjs.com/package/plugin-error

@craigphicks

This comment has been minimized.

@gulpjs gulpjs locked and limited conversation to collaborators May 15, 2020
@phated phated closed this as completed Sep 1, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants