Created
November 16, 2016 23:19
-
-
Save razbomi/693f8c24dd69675f1c516157478614c7 to your computer and use it in GitHub Desktop.
Gulp pipe function
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
var gulp = require('gulp'); | |
var through = require('through2'); | |
// https://gulp.readme.io/docs | |
gulp.task('default', () => { | |
gulp.src('src/**/*') | |
.pipe(pipeFunction()) | |
.pipe(gulp.dest('dist')) | |
}); | |
var pipeFunction = () => { | |
return through.obj((file, enc, cb) => { | |
console.log(file.path); | |
return cb(null, file); | |
}); | |
} |
isn't there a way to access the arguments in pipeFunction without using the through lib?
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thank you!!