-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Description
I like the sink functionality. I just wish I didn't have to define a variable first. 95% of my tasks are single statements, and use arrow functions. Would like to be able to write, e.g.:
gulp.task( 'example', () =>
gulp.src( [ 'foo/**/*.svg' ] )
.pipe( clone.pushSink() ) // create a new sink, push it to stack
.pipe( raster() ) // destructive editing
.pipe( rename() )
.pipe( clone.popSink() ) // pop sink from stack, tap sink
.pipe( gulp.dest( '.' ) )
);I don't think this would be hard to implement. Example:
const sinks = [];
clone.pushSink = () => {
const sink = clone.sink();
sinks.push( sink );
return sink;
};
clone.popSink = () => sinks.pop().tap();Metadata
Metadata
Assignees
Labels
No labels