• Stars
    star
    306
  • Rank 136,456 (Top 3 %)
  • Language
    TypeScript
  • License
    ISC License
  • Created almost 10 years ago
  • Updated over 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

webpack + node-notifier = build status system notifications

webpack-notifier

npm Version GitHub Workflow Status Coverage Status Code Style
npm npm bundle size

This is a webpack plugin that uses the node-notifier package to display build status system notifications to the user.

webpack-notifier screenshot

This is a fork of the webpack-error-notification plugin. It adds support for Windows and there is no need to manually install the terminal-notifier package on OS X anymore.

The plugin will notify you about the first run (success/fail), all failed runs and the first successful run after recovering from a build failure. In other words: it will stay silent if everything is fine with your build.

Installation

Use npm to install this package:

npm install --save-dev webpack-notifier

Check the node-notifier Requirements whether you need to install any additional tools for your OS.

Usage

In the webpack.config.js file:

var WebpackNotifierPlugin = require('webpack-notifier');

var config = module.exports = {
  // ...

  plugins: [
    new WebpackNotifierPlugin(),
  ]
}

Configuration

All node-notifier options

You can use any node-notifier options (depending on your OS) Except for options generated by the plugin itself:

  • title - it can be not only a string, but also a function
  • message - generated based on the value of other options
  • contentImage - it can be an object with images for different statuses
  • icon - matches with contentImage

Title

Title shown in the notification.

new WebpackNotifierPlugin({title: 'Webpack'});
new WebpackNotifierPlugin({title: function (params) {
  return `Build status is ${params.status} with message ${params.message}`;
}});

Emojis in message text

Show status emoji icon before the message.

new WebpackNotifierPlugin({emoji: true});

Content Image

Image shown in the notification. Can be a path string or object with paths.

String path:

var path = require('path');

new WebpackNotifierPlugin({contentImage: path.join(__dirname, 'logo.png')});

Object string path:

var path = require('path');

const statusesPaths = {
  success: path.join(__dirname, 'success.png'),
  warning: path.join(__dirname, 'warning.png'),
  error: path.join(__dirname, 'error.png')
}

new WebpackNotifierPlugin({contentImage: statusesPaths});

Exclude Warnings

If set to true, warnings will not cause a notification.

new WebpackNotifierPlugin({excludeWarnings: true});

Always Notify

Trigger a notification every time. Call it "noisy-mode".

new WebpackNotifierPlugin({alwaysNotify: true});

Notify on error

Trigger a notification only on error.

new WebpackNotifierPlugin({onlyOnError: true});

Skip Notification on the First Build

Do not notify on the first build. This allows you to receive notifications on subsequent incremental builds without being notified on the initial build.

new WebpackNotifierPlugin({skipFirstNotification: true});

More Repositories

1

sidebar-v2

A responsive sidebar with tabs for Leaflet, OpenLayers, Google Maps, ...
CSS
814
star
2

leaflet-sidebar

A responsive sidebar for Leaflet maps
JavaScript
487
star
3

utm

Bidirectional UTM-WGS84 converter for python
Python
443
star
4

intellij-emberjs

Ember.js support for JetBrains IDEs (IntelliJ, WebStorm, ...)
Kotlin
215
star
5

aerofiles

waypoint, task, tracklog readers and writers for aviation
Python
45
star
6

Android-Action-Bar-Icon-Pack-Font

The offical Android Action Bar Icon Pack as an iconic webfont
JavaScript
43
star
7

apwlibrary

Android PDF Writer
Java
42
star
8

eslint-plugin-chai-expect

ESLint plugin that checks for common chai.js expect() mistakes
JavaScript
27
star
9

PasParse

Delphi port of the DGrok (C#) Delphi parser
Pascal
27
star
10

igc-parser

IGC flight log parser
TypeScript
27
star
11

flat-projection-rs

Fast geodesic distance approximations via flat surface projection
Rust
19
star
12

aeroscore

Gliding Competition Scoring
TypeScript
16
star
13

setup.py

setup.py cheatsheet
CSS
16
star
14

ember-qr-scanner

QR Code scanner component for Ember.js
JavaScript
12
star
15

ogn-web-gateway

OpenGliderNet Web-Gateway
Rust
11
star
16

chai-roughly

deep equals assertions with tolerance for chai
JavaScript
11
star
17

flight-club

an online glider simulator
Java
9
star
18

ogn-web-viewer

OpenGliderNet WebViewer
JavaScript
8
star
19

ember-cli-rollup

JavaScript
7
star
20

auto-dist-tag

Automatically rewrites the "publishConfig.tag" setting in your "package.json" file for you
JavaScript
7
star
21

aprs-parser-rs

APRS message parser for Rust
Rust
7
star
22

ember-cli-deploy-ftp

ember-cli-deploy wrapper for ftp-deploy
JavaScript
6
star
23

united-flarmnet

Merging FlarmNet, OGN and WeGlide live tracking data into a single FlarmNet file
Rust
6
star
24

cabwiz

Native Linux replacement for Microsoft's cabwiz.exe
Python
6
star
25

openvario-protocol

OpenVario serial port protocol specification
6
star
26

hosted-git-info-rs

Provides metadata and conversions from repository urls for GitHub, Bitbucket and GitLab
JavaScript
6
star
27

chai-files

file system assertions for chai
JavaScript
5
star
28

github-labels

labels.json file for github-label-sync
5
star
29

toptherm-forecast-format

Reverse-engineered description of the DWD TopTherm forecast file format
4
star
30

igc-filename-parser

IGC flight log filename parser
JavaScript
4
star
31

open-flight-planner

Flight planning tool for glider pilots
JavaScript
3
star
32

flight-recorder-manufacturers

Flight Recorder Manufacturers and their assigned IGC codes
JavaScript
3
star
33

flarmnet.py

Python
3
star
34

DGrok

Delphi Parser
C#
3
star
35

segelflug-classifieds

Segelflug.de Kleinanzeigen Telegram Bot
HTML
2
star
36

skylines-ios-tracker

SkyLines tracking client for iOS
Objective-C
2
star
37

esp8266-nonos

Rust
2
star
38

libfap

(Unmaintained!) unofficial git mirror of libfap - APRS parser
Shell
2
star
39

openaip

OpenAIP file parser
JavaScript
2
star
40

semver-cargo

Parser and evaluator for Cargo's flavor of Semantic Versioning ... in JavaScript
TypeScript
2
star
41

flupp-rs

FluPP flight log file reader for Rust
Rust
2
star
42

FluPP

Pascal
1
star
43

sliding-menu

a sliding menu for Bootstrap 2.3
CSS
1
star
44

py-gpolyencode

Python modules for Google Maps polyline encoding
C++
1
star
45

multifix

Run simple fixes on multiple repositories
Rust
1
star
46

renovate-config

Shareable config presets for Renovate
JavaScript
1
star
47

mergejs.py

Standalone distribution of the mergejs tool of the OpenLayers project.
Python
1
star
48

actix-ogn

OpenGliderNetwork client for Rust based on actix
Rust
1
star
49

rust-igc

IGC file parser for Rust
Rust
1
star
50

lva-camo-status.vue

Vue
1
star
51

chrome-devtools-theme-firacode

Chrome DevTools theme with Fira Code font
JavaScript
1
star
52

avia-converter

Vereinsflieger.de to ameavia flight log converter
Python
1
star
53

strepla-api

scoring*StrePla "API" wrapper
HTML
1
star