From f28937352e0c128620c4f83964473e6c0853237a Mon Sep 17 00:00:00 2001 From: Stefan Fisk Date: Sun, 21 Oct 2018 15:23:35 +0200 Subject: [PATCH] Only log warnings Currently messages are only logged if there are warnings, but if there are then all messages are logged. --- index.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/index.js b/index.js index 9501e42..86ce9f1 100644 --- a/index.js +++ b/index.js @@ -232,9 +232,13 @@ function css(css, file) { chalk`{green Finished {bold ${relativePath}} in {bold ${prettyTime}}}` ) - if (result.warnings().length) { - console.warn(reporter(result)) - } + console.warn( + reporter( + Object.assign({}, result, { + messages: result.warnings() + }) + ) + ) return result })