From 4b23f830f0dcba163f5bf78933ea8fdb3ba7c4f6 Mon Sep 17 00:00:00 2001 From: Mike Fix Date: Mon, 21 Aug 2017 20:28:31 -0700 Subject: [PATCH] Reduce code --- bin/gest.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bin/gest.js b/bin/gest.js index 0dca89c..d9affcc 100755 --- a/bin/gest.js +++ b/bin/gest.js @@ -65,8 +65,9 @@ try { .then(values => Promise.all(values.map(v => { const paths = v.replace(process.cwd(), '.').split('/') + // separate file from rest of path const fileName = paths.pop() - const rep = paths.map(i => chalk.dim(i)).join('/') + chalk.dim('/') + fileName + const rep = chalk.dim(paths.concat('').join('/')).concat(fileName) const spinner = ora({ text: rep, color: 'magenta' }).start() return readFile(v) .then(gest(schema, Object.assign(options, { verbose: false })))