Commit cd0a8c3b authored by Guillaume Perréal's avatar Guillaume Perréal
Browse files

Affiche le chemin complet des fichiers dans les logs.

parent c5e1f1bd
import logger from "gulplog";
import { obj } from "through2";
import { relative } from "path";
export default function spy(limit = 5) {
let count = 0;
return obj(function(file, _enc, next) {
count++;
this.push(file);
next();
if (count > limit) {
if (file.isDirectory() || ++count > limit) {
return;
}
const input = file.history[0];
const output = file.path;
logger.info("%s -> %s", relative(file.cwd, input), relative(file.cwd, output));
logger.info("%s -> %s", file.history[0], file.path);
}, (next) => {
next();
if (count > limit) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment