Skip to content

Commit

Permalink
Only log warnings
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 committed Dec 16, 2018
1 parent 54cdf3a commit f289373
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 f289373

Please sign in to comment.