Skip to content

Commit ab5f535

Browse files
authored
Merge pull request #894 from HSPDev/master
#824 Added ability to disable success notifications
2 parents bebb104 + ea8cf39 commit ab5f535

File tree

3 files changed

+19
-3
lines changed

3 files changed

+19
-3
lines changed

src/Api.js

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -383,7 +383,15 @@ class Api {
383383
Config.notifications = false;
384384

385385
return this;
386-
}
386+
};
387+
388+
/**
389+
* Disable success notifications.
390+
*/
391+
disableSuccessNotifications() {
392+
Config.notificationsOnSuccess = false;
393+
return this;
394+
};
387395

388396

389397
/**

src/builder/webpack-plugins.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ module.exports = function () {
5555
plugins.push(
5656
new WebpackNotifierPlugin({
5757
title: 'Laravel Mix',
58-
alwaysNotify: true,
58+
alwaysNotify: Mix.isUsing('notificationsOnSuccess'),
5959
contentImage: Mix.paths.root('node_modules/laravel-mix/icons/laravel.png')
6060
})
6161
);

src/config.js

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,13 +121,21 @@ module.exports = function () {
121121

122122

123123
/**
124-
* Determine if notifications should be displayed for each build.
124+
* Determine if error notifications should be displayed for each build.
125125
*
126126
* @type {Boolean}
127127
*/
128128
notifications: true,
129129

130130

131+
/**
132+
* Determine if we should always show success notifications.
133+
*
134+
* @type {Boolean}
135+
*/
136+
notificationsOnSuccess: true,
137+
138+
131139
/**
132140
* Determine if sourcemaps should be created for the build.
133141
*

0 commit comments

Comments
 (0)