npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

pretty-mix-notifications

v1.1.3

Published

Make your laravel mix notifications pretty.

Downloads

5

Readme

Pretty Laravel Mix Notifications

Take 2 seconds to make your laravel-mix notifications pretty.

success failure

Installation

  1. npm install pretty-mix-notifications --save-dev or yarn add pretty-mix-notifications --dev
  2. Require the package to your webpack.mix.js file let Notifications = require('pretty-mix-notifications');
  3. Extend mix, and pass it the package. mix.extend('prettyNotifications', new Notifications);
  4. Call the prettyNotifications.

Here is a full example of a webpack.mix.js file that uses this package:

   let mix = require('laravel-mix');
   let Notifications = require('pretty-mix-notifications');
   
   mix.extend('prettyNotifications', new Notifications);
   
   /*
    |--------------------------------------------------------------------------
    | Mix Asset Management
    |--------------------------------------------------------------------------
    |
    | Mix provides a clean, fluent API for defining some Webpack build steps
    | for your Laravel application. By default, we are compiling the Sass
    | file for the application as well as bundling up all the JS files.
    |
    */
   
   mix.js('resources/assets/js/app.js', 'public/js')
      .sass('resources/assets/sass/app.scss', 'public/css')
       .prettyNotifications();

Override the default config

If you want to override the default configuration you can pass an object with your config to the prettyNotifications function.

Below we override the default successIcon and the default title.

    mix.js('resources/assets/js/app.js', 'public/js')
       .sass('resources/assets/sass/app.scss', 'public/css')
        .prettyNotifications(
            {
                title: "Pretty Mix Notifications",
                
                successIcon: path.resolve("./success.png"), 
            }
        );

Config Options

Here is the full list of the supported configuration. You can also pass any valid node-notifier option, that may not be listed here. Just keep in mind, that not every option of node-notifier works in the Windows platform.

title

The notification title. Defaults to Laravel-Mix build.

logo

The absolute path to the project logo to be displayed as a content image in the notification. Optional.

successSound

The sound to play for success notifications. Defaults to the value of the submarine for mac OS and Notification.Default for windows. Set to false to play no sound for success notifications.

  • In Mac OS successSound can be one of these: Basso, Blow, Bottle, Frog, Funk, Glass, Hero, Morse, Ping, Pop, Purr, Sosumi, Submarine, Tink. If sound is simply true, Bottle is used.
  • In Linux OS there are no sounds.
  • In windows you can choose any valid option described here. e.g. successSound: 'Notification.Mail'

warningSound

The sound to play for warning notifications. Defaults to the value of the submarine for mac OS and Notification.Default for windows. Set to false to play no sound for success notifications.

  • In Mac OS warningSound can be one of these: Basso, Blow, Bottle, Frog, Funk, Glass, Hero, Morse, Ping, Pop, Purr, Sosumi, Submarine, Tink. If sound is simply true, Bottle is used.
  • In Linux OS there are no sounds.
  • In windows you can choose any valid option described here. e.g. warningSound: 'Notification.Mail'

failureSound

The sound to play for failure notifications. Defaults to the value of the submarine for mac OS and Notification.Default for windows. Set to false to play no sound for success notifications.

  • In Mac OS failureSound can be one of these: Basso, Blow, Bottle, Frog, Funk, Glass, Hero, Morse, Ping, Pop, Purr, Sosumi, Submarine, Tink. If sound is simply true, Bottle is used.
  • In Linux OS there are no sounds.
  • In windows you can choose any valid option described here. e.g. failureSound: 'Notification.Mail'

suppressSuccess

Defines when success notifications are shown. Can be one of the following values:

  • false - Show success notification for each successful compilation (default).
  • true - Only show success notification for initial successful compilation and after failed compilations.
  • "always" - Never show the success notifications.
  • "initial" - Same as true, but suppresses the initial success notification.

suppressWarning

True to suppress the warning notifications, otherwise false (default).

suppressCompileStart

True to suppress the compilation started notifications (default), otherwise false.

activateTerminalOnError

True to activate (focus) the terminal window when a compilation error occurs. Note that this only works on Mac OSX (for now). Defaults to false. Regardless of the value of this config option, the terminal window can always be brought to the front by clicking on the notification.

successIcon

The absolute path to the icon to be displayed for success notifications. Defaults to the included ./icons/success.png.

warningIcon

The absolute path to the icon to be displayed for warning notifications. Defaults to the included ./icons/warning.png.

failureIcon

The absolute path to the icon to be displayed for failure notifications. Defaults to the included ./icons/failure.png.

compileIcon

The absolute path to the icon to be displayed for compilation started notifications. Defaults to the included ./icons/compile.png.

messageFormatter

A function which returns a formatted notification message. The function is passed two parameters:

  • {Object} error/warning - The raw error or warning object.
  • {String} filepath - The path to the file containing the error/warning (if available).

This function must return a String. The default messageFormatter will display the filename which contains the error/warning followed by the error/warning message. Note that the message will always be limited to 256 characters.

onClick

A function to be called when the notification is clicked. By default it activates the Terminal application. (Does not work on windows)

The function's signature

{
   // other options
   onClick: function(notifierObject, options){}
}

onTimeout

A function to be called when the notification closes. By default it does not do anything.

The function's signature

//Configuration options
{
   // other options
   onTimeout: function(notifierObject, options){}
}

Contributing

Thank you for considering contributing to the Pretty Mix Notifications.

License

Pretty Mix Notifications is open-sourced software licensed under the MIT license.