From 587dba468d81d9956b46068fb03ec676ebbd2e38 Mon Sep 17 00:00:00 2001 From: Stefan Penner Date: Tue, 20 Dec 2016 13:09:29 -0800 Subject: [PATCH] [Fixes #38 #36] improve slow concat warning MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * don’t show of `—silent` is used * identify the current plugin when warning --- index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/index.js b/index.js index ea2ea52..cbde95c 100644 --- a/index.js +++ b/index.js @@ -127,8 +127,8 @@ UglifyWriter.prototype.processFile = function(inFile, outFile, relativePath, out var total = end - start; debug('[finished]: %s %dKB in %dms', relativePath, (result.code.length / 1000), total); - if (total > 20000) { - console.warn('[WARN] `' + relativePath + '` took: ' + total + 'ms (more than 20,000ms)'); + if (total > 20000 && process.argv.indexOf('--silent') === -1) { + console.warn('[WARN] (broccoli-uglify-sourcemap) Minifying: `' + relativePath + '` took: ' + total + 'ms (more than 20,000ms)'); }