Skip to content

Instantly share code, notes, and snippets.

@bikeonastick
Created June 14, 2015 20:10
Show Gist options
  • Save bikeonastick/6b947e791e6513f68e14 to your computer and use it in GitHub Desktop.
Save bikeonastick/6b947e791e6513f68e14 to your computer and use it in GitHub Desktop.
dealing with node stream
var through = require('through2');
gulp.src('deploy/**')
.pipe(
through.obj(function(file,enc,cb){
if ( file.isBuffer() ) {
console.log(file.path);
} else {
console.log("DIRECTORY");
}
cb();
}
)
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment