0

How to add grunt-notify module to Magento 2 Grunt config. Reference: https://github.com/dylang/grunt-notify

Thanks.

1 Answer 1

1

Step: 1

Install grunt-notify

npm install grunt-notify --save-dev

Step: 2

Now load the grunt-notify library by adding below entry in the Gruntfile.js

grunt.loadNpmTasks('grunt-notify');

Additional Configurations

If you wan to customize the message popup styles and notification timings.

Note: But after adding this overrides only I got notifications in Windows 10.

// example configuration for notification hooks
 grunt.initConfig({
    notify_hooks:{
        options:{
            enable:true,
            title: 'Task Completed', 
            max_jshint_notifications:5,
        },
        uncss:{
            options:{                        
                title: 'Task Completeddd', 
                message:"Error occured",
            },
        },
    },             
});

Settings WRT to OS notifications:

Nothing to install for LINUX and Windows 8.x or Higher. If you are using Mac please read the documentation in github

References

If you yet to configure grunt for Magento there is a Documentation on Howto's

enter image description here

1
  • 1
    Great, thanks, I made the same but placed the grunt.loadNpmTasks('grunt-notify'); before the final brace. Moved to function(task, name) { }), everything working fine now. I have Won 10, too.
    – Max.A
    Oct 23, 2019 at 15:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.