dylang / grunt-notify

Automatic Notifications when Grunt tasks fail.
https://npmjs.org/package/grunt-notify
MIT License
921 stars 73 forks source link

Notify send custom images #96

Open flga opened 9 years ago

flga commented 9 years ago

This change allows the user to customize the notification image on Linux.

Path resolving is done by node's path.resolve(to). Relative paths are admissible.

Example:

//in node
var path = require('path');
var notify = require('../lib/notify-lib');

notify({
    image: 'my_logo.png',
    duration: 4,
    title: '...',
    message: '...',
});

//in grunt
grunt.initConfig({
    notify: {
        options: {
            duration: 4,
            image: 'my_logo.png',
            title: '...',
            message: '...',
        }
    }
});
honsa commented 5 years ago

The commit looks good, just one condition added, if option.image is set use the string to the path otherwise the default image path is used.

Please approve this pull request :)