Closed retrofox closed 9 years ago
Can be relevant for changing the cwd propety of vinyl files
then don't change any file property. I use file.path to know the real path for each file.
Heh! I just modified my local files to do this, and then prepared to make a PR when I saw it was already in the oven (and ready for merge afaikt). Go for it :)
:+1: can we get this merged?
:+1:
@retrofox
Could you show us more detailed use case?
I'm afraid that this API might be used outside the use of rename plugin.
Closing this PR since we can directly use through2 in this case.
var gulp = require('gulp');
var through = require('through2');
gulp.src('src/*.js')
.pipe(through.obj(function(file, enc, cb) {
// process
}));
Perhaps there are other reasons that aren't mentioned here, but rejecting this based on the fact that it can be done with through2
seems moot. We could directly use through2 in the .pipe(rename(function(path) {...}))
case, too, yet the functionality is there.
For some particular situations I've needed that work watching the file stream. For instance when the src parameter is an array.
Best!