1 | "use strict";
|
2 | var __importDefault = (this && this.__importDefault) || function (mod) {
|
3 | return (mod && mod.__esModule) ? mod : { "default": mod };
|
4 | };
|
5 | Object.defineProperty(exports, "__esModule", { value: true });
|
6 | const webpack_notifier_1 = __importDefault(require("webpack-notifier"));
|
7 | class 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 | }
|
25 | exports.default = NotificationPack;
|
26 |
|
\ | No newline at end of file |