webpack-notifier

  • Version 1.17.0
  • Published
  • 24.1 kB
  • 3 dependencies
  • ISC license

Install

npm i webpack-notifier
yarn add webpack-notifier
pnpm add webpack-notifier

Overview

webpack + node-notifier = build status system notifications

Index

Classes

class WebpackNotifierPlugin

class WebpackNotifierPlugin {}

    constructor

    constructor(options?: WebpackNotifierPlugin.Options);

      method apply

      apply: (compiler: Compiler) => void;

        Interfaces

        interface Options

        interface Options {}

          property alwaysNotify

          alwaysNotify?: boolean;

            property contentImage

            contentImage?: { [key in 'success' | 'warning' | 'error']: string } | string;

              property emoji

              emoji?: boolean;
              • Use emoji in notifications

              property excludeWarnings

              excludeWarnings?: boolean;

                property notifier

                notifier?: string | NotifierConstructor;
                • node-notifier notifier to use: the name of one of its exported notifier classes ('NotificationCenter', 'WindowsToaster', 'WindowsBalloon', 'Growl', 'NotifySend') or the class itself

                  v1.17.0

                property notifierOptions

                notifierOptions?: NotifierConstructorOptions;
                • Options passed to the notifier constructor (see notifier)

                  v1.17.0

                property notifyOptions

                notifyOptions?: NotifyOptions;
                • Additional options passed to node-notifier on every notification

                  v1.17.0

                property onlyOnError

                onlyOnError?: boolean;

                  property skipFirstNotification

                  skipFirstNotification?: boolean;

                    property title

                    title?: string | TitleGetter;

                      Type Aliases

                      type Config

                      type Config = Options;
                      • Deprecated

                        use Options

                      type ConstructorOptionsOf

                      type ConstructorOptionsOf<C extends new (...args: any[]) => any> = NonNullable<
                      ConstructorParameters<C>[0]
                      >;

                        type DistributiveOmit

                        type DistributiveOmit<T, K extends keyof any> = T extends any ? Omit<T, K> : never;

                          type Growl

                          type Growl = typeof nodeNotifier.Growl;

                            type NotificationCenter

                            type NotificationCenter = typeof nodeNotifier.NotificationCenter;

                              type NotifierConstructor

                              type NotifierConstructor = new (options?: object) => {
                              notify(options: object, callback?: (...args: unknown[]) => void): unknown;
                              };
                              • A node-notifier notifier class, e.g. require('node-notifier').WindowsToaster.

                              type NotifierConstructorOptions

                              type NotifierConstructorOptions =
                              | ConstructorOptionsOf<NotificationCenter>
                              | ConstructorOptionsOf<WindowsToaster>
                              | ConstructorOptionsOf<WindowsBalloon>
                              | ConstructorOptionsOf<NotifySend>
                              | ConstructorOptionsOf<Growl>;
                              • Options accepted by the constructor of any node-notifier notifier.

                              type NotifyOptions

                              type NotifyOptions = DistributiveOmit<
                              | NotifyOptionsOf<NotificationCenter>
                              | NotifyOptionsOf<WindowsToaster>
                              | NotifyOptionsOf<WindowsBalloon>
                              | NotifyOptionsOf<NotifySend>
                              | NotifyOptionsOf<Growl>,
                              PluginGeneratedFields
                              >;
                              • Options accepted by the notify method of any node-notifier notifier. When no notifier is set, all of these are available. The plugin generates title, message, contentImage and icon itself, so those are not accepted here.

                              type NotifyOptionsOf

                              type NotifyOptionsOf<C extends new (...args: any[]) => any> = NonNullable<
                              Parameters<InstanceType<C>['notify']>[0]
                              >;

                                type NotifySend

                                type NotifySend = typeof nodeNotifier.NotifySend;

                                  type PluginGeneratedFields

                                  type PluginGeneratedFields = 'title' | 'message' | 'contentImage' | 'icon';
                                  • notify options generated by the plugin and not accepted in notifyOptions

                                  type TitleGetter

                                  type TitleGetter = (data: {
                                  msg: string;
                                  message: string;
                                  status: string;
                                  }) => string;

                                    type WindowsBalloon

                                    type WindowsBalloon = typeof nodeNotifier.WindowsBalloon;

                                      type WindowsToaster

                                      type WindowsToaster = typeof nodeNotifier.WindowsToaster;

                                        Package Files (1)

                                        Dependencies (3)

                                        Dev Dependencies (18)

                                        Peer Dependencies (1)

                                        Badge

                                        To add a badge like this onejsDocs.io badgeto your package's README, use the codes available below.

                                        You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/webpack-notifier.

                                        • Markdown
                                          [![jsDocs.io](https://img.shields.io/badge/jsDocs.io-reference-blue)](https://www.jsdocs.io/package/webpack-notifier)
                                        • HTML
                                          <a href="https://www.jsdocs.io/package/webpack-notifier"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>