Skip to content

Commit

Permalink
Merge pull request #2 from kentcdodds/patch-1
Browse files Browse the repository at this point in the history
Allow specifying options to ignore warnings
  • Loading branch information
Turbo87 committed Feb 27, 2015
2 parents 8cf1d87 + 50e9fa8 commit 26693da
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ var WebpackNotifierPlugin = module.exports = function(options) {

WebpackNotifierPlugin.prototype.compileMessage = function(stats) {
var error;
if (stats.hasWarnings()) {
error = stats.compilation.warnings[0];
}
if (stats.hasErrors()) {
error = stats.compilation.errors[0];
}
if (!error && stats.hasWarnings() && !this.options.excludeWarnings) {
error = stats.compilation.warnings[0];
}

if (error) {
try {
Expand Down

0 comments on commit 26693da

Please sign in to comment.