Laravel-mix: [Question] How to disable notification if the build is successful?

Created on 21 May 2017  路  5Comments  路  Source: JeffreyWay/laravel-mix

I want to disable os notifications on success builds when I hit save. I just want be notified if there are errors or warnings.. I tried the code below but didn't work.

mix.js('resources/assets/js/app.js', 'public/dist/vendor.js')
   .sourceMaps().then(function (stats) {
        // if (!stats.hasErrors() || !stats.hasWarnings()) {
            mix.disableNotifications();
        // }
   });
enhancement

Most helpful comment

Awesome! Thanks @JeffreyWay and @HSPDev.
Would it be possible to add this to the docs? It only mentions .disableNotifications() there so I only found out about the disableSuccessNotifications() function by looking at the pull request of HSPDev. Others looking for the same feature might not easily find it here.

All 5 comments

I don't think it is possible right now. But i like the idea.

You can't at the moment.

This would be a great feature. The notification in the top right hand corner of my window is extremely distracting (MacOS). Would love to be able to disable it for everything but errors.

@JohnnyWalkerDesign I've made a fix at https://github.com/JeffreyWay/laravel-mix/pull/894
Just waiting for @JeffreyWay <3

Awesome! Thanks @JeffreyWay and @HSPDev.
Would it be possible to add this to the docs? It only mentions .disableNotifications() there so I only found out about the disableSuccessNotifications() function by looking at the pull request of HSPDev. Others looking for the same feature might not easily find it here.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

stefensuhat picture stefensuhat  路  3Comments

dtheb picture dtheb  路  3Comments

mstralka picture mstralka  路  3Comments

amin101 picture amin101  路  3Comments

terion-name picture terion-name  路  3Comments