webpack-build-notifier
Advanced tools
Comparing version 0.1.9 to 0.1.10
@@ -9,2 +9,3 @@ /** | ||
var notifier = require('node-notifier'); | ||
var stripAnsi = require('strip-ansi'); | ||
var exec = require('child_process').exec; | ||
@@ -108,5 +109,6 @@ | ||
if (results.hasErrors()) { | ||
var error = results.compilation.errors[0]; | ||
notify = true; | ||
title += 'Error'; | ||
msg = results.compilation.errors[0].message; | ||
msg = error.module.rawRequest + '\n' + error.error.replace(error.module.resource, ''); | ||
icon = this.failureIcon; | ||
@@ -116,5 +118,6 @@ sound = this.failureSound; | ||
} else if (!this.suppressWarning && results.hasWarnings()) { | ||
var warning = results.compilation.warnings[0]; | ||
notify = true; | ||
title += 'Warning'; | ||
msg = results.compilation.warnings[0].message; | ||
msg = warning.module.rawRequest + '\n' + warning.warning.replace(warning.module.resource, ''); | ||
icon = this.warningIcon; | ||
@@ -134,3 +137,3 @@ sound = this.failureSound; | ||
title: title, | ||
message: msg, | ||
message: stripAnsi(msg), | ||
sound: sound, | ||
@@ -137,0 +140,0 @@ contentImage: this.logo, |
{ | ||
"name": "webpack-build-notifier", | ||
"version": "0.1.9", | ||
"version": "0.1.10", | ||
"description": "A Webpack plugin that generates OS notifications for build steps using node-notifier.", | ||
@@ -26,3 +26,5 @@ "main": "index.js", | ||
"dependencies": { | ||
"node-notifier": "^4.1.0" | ||
"ansi-regex": "^2.0.0", | ||
"node-notifier": "^4.1.0", | ||
"strip-ansi": "^3.0.1" | ||
}, | ||
@@ -29,0 +31,0 @@ "devDependencies": { |
@@ -72,3 +72,3 @@ # webpack-build-notifier | ||
------------------- | ||
* Re-work the notification message to display more useful information. At present, it shows the error/warning's "message" text which is not very useful as it contains inline formatting and is quite verbose. Perhaps update to instead show a list file(s) with error(s)/warning(s)? | ||
* TBD | ||
@@ -85,6 +85,11 @@ Notes | ||
--------- | ||
#### 1.0.10 | ||
###### _July 14, 2016_ | ||
- Added reference to *[strip-ansi](https://www.npmjs.com/package/strip-ansi)* NPM package to remove CLI color formatting from notifications. | ||
#### 1.0.9 | ||
###### _July 5, 2016_ | ||
-Added new *onClick* configuration option to allow for specifying of notification click behavior. | ||
- Added new *onClick* configuration option to allow for specifying of notification click behavior. | ||
@@ -91,0 +96,0 @@ #### 1.0.8 |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
104352
140
108
3
+ Addedansi-regex@^2.0.0
+ Addedstrip-ansi@^3.0.1
+ Addedansi-regex@2.1.1(transitive)
+ Addedstrip-ansi@3.0.1(transitive)