Skip to content

Instantly share code, notes, and snippets.

@illvart
Last active May 28, 2019 16:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save illvart/dad73d0ed3ab1be59ca29ff77960bf71 to your computer and use it in GitHub Desktop.
Save illvart/dad73d0ed3ab1be59ca29ff77960bf71 to your computer and use it in GitHub Desktop.
Gulp log
const through = require("through2");
const verify = title => {
const write = (file, enc, cb) => {
console.log("File", file.path);
cb(null, file);
};
const end = cb => {
console.log(`${title} done!`);
cb();
};
const options = { objectMode: true };
return through(options, write, end);
};
.pipe(verify("yay"));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment