node-notifier
Advanced tools
Comparing version 4.6.0 to 4.6.1
Changelog | ||
=== | ||
### `v4.6.1` | ||
1. Adds npm ignore file, ignoring tests and examples from package. | ||
2. Fixes CI builds | ||
### `v4.6.0` | ||
@@ -5,0 +11,0 @@ |
@@ -316,2 +316,7 @@ var cp = require('child_process'), | ||
if (options.type) { | ||
options.t = sanitizeNotifuTypeArgument(options.type); | ||
delete options.type; | ||
} | ||
return options; | ||
@@ -341,2 +346,15 @@ }; | ||
return version; | ||
} | ||
function sanitizeNotifuTypeArgument(type) { | ||
if (typeof type === 'string' || type instanceof String) { | ||
if (type.toLowerCase() == 'info') | ||
return 'info'; | ||
if (type.toLowerCase() == 'warn') | ||
return 'warn'; | ||
if (type.toLowerCase() == 'error') | ||
return 'error'; | ||
} | ||
return 'info'; | ||
} |
{ | ||
"name": "node-notifier", | ||
"version": "4.6.0", | ||
"version": "4.6.1", | ||
"description": "A Node.js module for sending notifications on native Mac, Windows (post and pre 8) and Linux (or Growl as fallback)", | ||
@@ -27,3 +27,3 @@ "main": "index.js", | ||
"devDependencies": { | ||
"mocha": "^1.21.4", | ||
"mocha": "^3.0.0", | ||
"should": "^4.0.4" | ||
@@ -30,0 +30,0 @@ }, |
@@ -248,2 +248,3 @@ # node-notifier [![NPM version][npm-image]][npm-url] [![Build Status][travis-image]][travis-url] [![Dependency Status][depstat-image]][depstat-url] | ||
wait: false, // Wait for User Action against Notification | ||
type: 'info' // The notification type : info | warn | error | ||
}, function(error, response) { | ||
@@ -344,2 +345,14 @@ console.log(response); | ||
### Using Webpack | ||
When using node-notifier inside of webpack, you must add the following snippet to your `webpack.config.js`. The reason this is required, is because node-notifier loads the notifiers from a binary, and so a relative file path is needed. When webpack compiles the modules, it supresses file directories, causing node-notifier to error on certain platforms. To fix/workaround this, you must tell webpack to keep the relative file directories, by doing so, append the following code to your `webpack.config.js` | ||
```javascript | ||
node: { | ||
__filename: true, | ||
__dirname: true | ||
} | ||
``` | ||
## License | ||
@@ -346,0 +359,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
369
1
1745600
26
809