From cd0a8c3b03763987af5172c4d86ad6921a1fcb3f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Guillaume=20Perr=C3=A9al?= <guillaume.perreal@inrae.fr>
Date: Mon, 11 May 2020 09:40:18 +0200
Subject: [PATCH] Affiche le chemin complet des fichiers dans les logs.

---
 gulpfile.esm.js/plugins/spy.js | 9 ++-------
 1 file changed, 2 insertions(+), 7 deletions(-)

diff --git a/gulpfile.esm.js/plugins/spy.js b/gulpfile.esm.js/plugins/spy.js
index 8e89b10..256efc0 100644
--- a/gulpfile.esm.js/plugins/spy.js
+++ b/gulpfile.esm.js/plugins/spy.js
@@ -1,21 +1,16 @@
 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) {
-- 
GitLab