UNPKG

876 BJavaScriptView Raw
1"use strict";
2var __importDefault = (this && this.__importDefault) || function (mod) {
3 return (mod && mod.__esModule) ? mod : { "default": mod };
4};
5Object.defineProperty(exports, "__esModule", { value: true });
6const webpack_notifier_1 = __importDefault(require("webpack-notifier"));
7class NotificationPack {
8 constructor(options = {}) {
9 this.defaults = {
10 alwaysNotify: false,
11 excludeWarnings: true,
12 };
13 this.configuration = {
14 plugins: [],
15 };
16 this.options = Object.assign(Object.assign({}, this.defaults), options);
17 }
18 generate(options, hints) {
19 if (hints.notify) {
20 this.configuration.plugins.push(new webpack_notifier_1.default(this.options));
21 }
22 return this.configuration;
23 }
24}
25exports.default = NotificationPack;
26//# sourceMappingURL=pack.js.map
\No newline at end of file