@packmule/notification-pack
Version:
Packmule pack to dispatch build-time desktop notifications.
24 lines • 645 B
JavaScript
import NotifierPlugin from 'webpack-notifier';
export default class NotificationPack {
constructor(options = {}) {
this.defaults = {
alwaysNotify: false,
excludeWarnings: true,
};
this.configuration = {
plugins: [],
};
this.options = {
...this.defaults,
...options,
};
}
generate(options, hints) {
if (hints.notify) {
const plugin = new NotifierPlugin(this.options);
this.configuration.plugins.push(plugin);
}
return this.configuration;
}
}
//# sourceMappingURL=pack.js.map