Gathering detailed insights and metrics for webpack-build-notifier
Gathering detailed insights and metrics for webpack-build-notifier
Gathering detailed insights and metrics for webpack-build-notifier
Gathering detailed insights and metrics for webpack-build-notifier
webpack-notifier
webpack + node-notifier = build status system notifications
simple-update-notifier
Simple update notifier to check for npm updates for cli applications
node-notifier
A Node.js module for sending notifications on native Mac, Windows (post and pre 8) and Linux (or Growl as fallback)
fork-ts-checker-notifier-webpack-plugin
a notifier for users of fork-ts-checker-webpack-plugin
A Webpack plugin that generates OS notifications for build steps using node-notifier.
npm install webpack-build-notifier
54.8
Supply Chain
68.8
Quality
76.9
Maintenance
100
Vulnerability
98.6
License
[3.1.0] ESM Support
Published on 29 May 2024
[3.0.0] Webpack 5 support; fixes #80, #91
Published on 27 May 2024
Fixes for child compiler instances
Published on 23 Jun 2020
Converted to TypeScript; Increased test coverage.
Published on 16 Oct 2019
Updated node-notifier dependency to latest version to fix #43.
Published on 15 Oct 2019
Added showDuration Option
Published on 15 Oct 2019
Module System
Min. Node Version
Typescript Support
Node Version
NPM Version
162 Stars
147 Commits
24 Forks
5 Watching
3 Branches
15 Contributors
Updated on 16 Jul 2024
Minified
Minified + Gzipped
TypeScript (97.89%)
JavaScript (2.11%)
Cumulative downloads
Total Downloads
Last day
-20.4%
5,556
Compared to previous day
Last week
-8.4%
33,003
Compared to previous week
Last month
-3%
148,395
Compared to previous month
Last year
17.6%
2,244,421
Compared to previous year
2
1
A Webpack plugin that uses the node-notifier package to display OS-level notifications for Webpack build events.
webpack-build-notifier can generate notifications for compilation warnings and errors, as well as notify you when the compilation process is triggered and completes successfully. Take a look at the Config Options to learn more about what webpack-build-notifier can do.
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? 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.
To use, install the webpack-build-notifier package npm install webpack-build-notifier --save-dev
and add the plugin to your Webpack configuration file:
1// webpack.config.js 2const WebpackBuildNotifierPlugin = require('webpack-build-notifier'); 3 4module.exports = { 5 // ... snip ... 6 plugins: [ 7 new WebpackBuildNotifierPlugin({ 8 title: "My Webpack Project", 9 logo: path.resolve("./img/favicon.png"), 10 suppressSuccess: true, // don't spam success notifications 11 }) 12 ], 13 // ... snip ... 14}
The notification title. Defaults to Webpack Build.
The absolute path to the project logo to be displayed as a content image in the notification. Optional.
The sound to play for notifications. Set to false to play no sound. Valid sounds are listedin the node-notifier project, here. Defaults to Submarine.
The sound to play for success notifications. Defaults to the value of the sound configuration option. Set to false to play no sound for success notifications. Takes precedence over the sound configuration option.
The sound to play for warning notifications. Defaults to the value of the sound configuration option. Set to false to play no sound for warning notifications. Takes precedence over the sound configuration option.
The sound to play for failure notifications. Defaults to the value of the sound configuration option. Set to false to play no sound for failure notifications. Takes precedence over the sound configuration option.
The sound to play for compilation notifications. Defaults to the value of the sound configuration option. Set to false to play no sound for compilation notifications. Takes precedence over the sound configuration option.
A function which is invoked when compilation starts. Optional. The function is passed one parameter:
suppressCompileStart
must be false
.A function which is invoked when compilation completes. Optional. The function is passed two parameters:
Defines when success notifications are shown. Can be one of the following values:
True to show the duration of a successful compilation, otherwise false (default).
True to suppress the warning notifications, otherwise false (default).
True to suppress the compilation started notifications (default), otherwise false.
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.
The absolute path to the icon to be displayed for success notifications. Defaults to the included ./src/icons/success.png.
The absolute path to the icon to be displayed for warning notifications. Defaults to the included ./src/icons/warning.png.
The absolute path to the icon to be displayed for failure notifications. Defaults to the included ./src/icons/failure.png.
The absolute path to the icon to be displayed for compilation started notifications. Defaults to the included ./src/icons/compile.png.
A function which returns a formatted notification message on successful compilation. This function must return a String. The default formatter will display "Build successful!". Note that the message will always be limited to 256 characters.
A function which returns a formatted notification message on error or warning. The function is passed 4 parameters:
This function must return a String. The default messageFormatter will display the filename which contains the error/warning followed by the error/warning message. Note that the message will always be limited to 256 characters.
Any additional node-notifier options as documented in the node-notifier documentation. Note that options provided here will only be applied to the success/warning/error notifications (not the "compilation started" notification). The title, message, sound, contentImage (logo), and icon options will be ignored, as they will be set via the corresponding WebpackBuildNotifier config options (either user-specified or default).
A function called when the notification is clicked. By default it activates the Terminal application.
A function called when the notification times out and is closed. Undefined by default.
This project is written in TypeScript, and type declarations are included. You can take advantage of this if your project's webpack configuration is also using TypeScript (e.g. webpack.config.ts
).
1// webpack.config.ts 2import * as webpack from 'webpack' 3import * as WebpackBuildNotifierPlugin from 'webpack-build-notifier'; 4 5const config: webpack.Configuration = { 6 // ... snip ... 7 plugins: [ 8 new WebpackBuildNotifierPlugin({ 9 title: "My Webpack Project", 10 logo: path.resolve("./img/favicon.png"), 11 suppressSuccess: true, // don't spam success notifications 12 }) 13 ], 14 // ... snip ... 15}; 16 17export default config;
After publishing this package I discovered a couple other similar plugins that are worth looking into:
Given the purpose and similarities, this project probably could have been a fork of one of these.
View the changelog here.
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
5 existing vulnerabilities detected
Details
Reason
Found 5/21 approved changesets -- score normalized to 2
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Score
Last Scanned on 2024-11-25
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More