Skip to content

Commit

Permalink
Only log warnings (#244)
Browse files Browse the repository at this point in the history
Currently messages are only logged if there are warnings, but if there are then all messages are logged.
  • Loading branch information
stefanfisk authored and RyanZim committed Dec 19, 2018
1 parent 54cdf3a commit 9ab9a2f
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
})
Expand Down

0 comments on commit 9ab9a2f

Please sign in to comment.