Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

webpack-build-notifier

Package Overview
Dependencies
Maintainers
1
Versions
55
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

webpack-build-notifier - npm Package Compare versions

Comparing version 0.1.16 to 0.1.17

icons/compile.png

23

index.js

@@ -65,2 +65,7 @@ /**

this.suppressWarning = cfg.suppressWarning || false;
/**
* @cfg {Boolean} [suppressWarning=true]
* True to suppress the compilation started notifications (default), otherwise false.
*/
this.suppressCompileStart = cfg.suppressCompileStart !== false;
/**

@@ -88,2 +93,7 @@ * @cfg {Boolean} [activateTerminalOnError=false]

/**
* @cfg {String} [compileIcon='./icons/compile.png']
* The absolute path to the icon to be displayed for compilation started notifications.
*/
this.compileIcon = cfg.compileIcon || path.join(defaultIconPath, 'compile.png');
/**
* @cfg {Function} onClick

@@ -120,2 +130,12 @@ * A function called when clicking the notification. By default, it activates the Terminal application.

WebpackBuildNotifierPlugin.prototype.onCompilationWatchRun = function(compilation, callback) {
notifier.notify({
title: this.title,
message: 'Compilation started...',
contentImage: this.logo,
icon: this.compileIcon
});
callback();
};
WebpackBuildNotifierPlugin.prototype.onCompilationDone = function(results) {

@@ -173,2 +193,5 @@ var notify,

WebpackBuildNotifierPlugin.prototype.apply = function(compiler) {
if (!this.suppressCompileStart) {
compiler.plugin('watch-run', this.onCompilationWatchRun.bind(this));
}
compiler.plugin('done', this.onCompilationDone.bind(this));

@@ -175,0 +198,0 @@ };

2

package.json
{
"name": "webpack-build-notifier",
"version": "0.1.16",
"version": "0.1.17",
"description": "A Webpack plugin that generates OS notifications for build steps using node-notifier.",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -7,2 +7,4 @@ # webpack-build-notifier

<img width="334" alt="webpack-build-notifier-error" src="https://user-images.githubusercontent.com/1934237/28636873-799c8c54-71f4-11e7-8d0c-be15ca823f6e.png"><img width="334" alt="webpack-build-notifier-success" src="https://user-images.githubusercontent.com/1934237/28636881-7f394dd2-71f4-11e7-9148-4dba316a41a8.png">
Are you tired of having to constantly switch between your IDE and terminal window to see whether your latest edits resulted in a failed build? Why didn't your latest changes get [hot-loaded](https://github.com/gaearon/react-hot-loader)? Was there a syntax error or failed unit test? With this plugin, you will always be apprised of build problems without having to keep an eye on your terminal window.

@@ -12,3 +14,2 @@

```javascript

@@ -62,2 +63,5 @@ // webpack.config.js

#### suppressCompileStart
True to suppress the compilation started notifications (default), otherwise false.
#### activateTerminalOnError

@@ -81,2 +85,7 @@ True to activate (focus) the terminal window when a compilation error occurs. Note that this only works on Mac OSX (for now). Defaults to **_false_**. Regardless of the value of this config option, the terminal window can always be brought to the front by clicking on the notification.

#### compileIcon
The absolute path to the icon to be displayed for compilation started notifications. Defaults to the included **_./icons/compile.png_**.
![Compile](https://github.com/RoccoC/webpack-build-notifier/blob/master/icons/compile.png?raw=true "Compile")
#### messageFormatter

@@ -104,3 +113,10 @@ A function which returns a formatted notification message. The function is passed two parameters:

---------
#### 1.0.16
#### 0.1.17
###### _November 6, 2017_
- Added notification hook for webpack "watch-run" compilation event to show notifications when the compilation process has started.
Added *suppressCompileStart* and *compileIcon* configuration options to support this. This notification will not be shown by default;
set *suppressCompileStart* to *false* to enable.
#### 0.1.16
###### _July 25, 2017_

@@ -110,3 +126,3 @@

#### 1.0.15
#### 0.1.15
###### _July 17, 2017_

@@ -116,3 +132,3 @@

#### 1.0.14
#### 0.1.14
###### _June 14, 2017_

@@ -122,3 +138,3 @@

#### 1.0.13
#### 0.1.13
###### _October 19, 2016_

@@ -129,3 +145,3 @@

#### 1.0.12
#### 0.1.12
###### _July 25, 2016_

@@ -136,3 +152,3 @@

#### 1.0.11
#### 0.1.11
###### _July 16, 2016_

@@ -142,3 +158,3 @@

#### 1.0.10
#### 0.1.10
###### _July 14, 2016_

@@ -148,3 +164,3 @@

#### 1.0.9
#### 0.1.9
###### _July 5, 2016_

@@ -154,3 +170,3 @@

#### 1.0.8
#### 0.1.8
###### _February 17, 2016_

@@ -160,3 +176,3 @@

#### 1.0.7
#### 0.1.7
###### _January 18, 2016_

@@ -166,5 +182,5 @@

#### 1.0.6
#### 0.1.6
###### _December 17, 2015_
- Added *suppressWarning* configuration option.
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc