grunt-notify
grunt-notify copied to clipboard
No notification appears on Windows
Hi guys,
After installing grunt-notify on my project and Growl for Windows (7), i don't have notification if i start any task.
A part of my gruntfile :
notify: {
watch: {
options: {
title: 'Task Complete', // optional
message: 'SASS and Uglify finished running', //required
}
}
}
// 4. Nous disons à Grunt quoi faire lorsque nous tapons "grunt" dans la console.
grunt.task.run('notify_hooks');
// Les tâches par défaut
grunt.registerTask('default', 'cmq', 'concat', 'uglify', 'watch', 'notify_hooks');
grunt.registerTask('dev', ['watch', 'notify']);
Any idea ? :)
Thank you !
Up :)
Try adding:
windowsVerbatimArguments: true
to options
array of:
grunt-notify\lib\util\spawn.js
Config's title
and message
must be double-quoted, like so:
title: '"Task Complete"',
message: '"SASS and Uglify finished running"'
Hello!
Windows 7 users, maybe this fix can help you !
Just change:
'/i:' + image
with
windowsOnly('/i:"') + image.replace(/\\/g,"/") + windowsOnly('"')
in grunt-notify/lib/platforms/growl-notify.js, line 72.
It correctly escape the system path to the notification icon file ;)
Very happy seeing again my notifications here :D !!!
Hi guys :)
I still have no notifications on Windows (7 and 10). Maybe my gruntfile can help you :
notify_hooks: {
options: {
enabled: true,
max_js_hint_notifications: 5,
title: 'Cookiejar'
}
},
grunt.registerTask('test', ['php']);
grunt.registerTask('dev', ['watch', 'notify_hooks']);
grunt.registerTask('default', 'concat', 'watch');
// Les tâches de productions
grunt.registerTask('prod', ['concat', 'uglify', 'sass', 'combine_mq', 'cssmin']);
Edit : I've notif only if i've a error on my gruntfile (example task not found).
Thank you !
Hi!
Try putting your title and message between " and ', like in the following example:
watch: { options: { title: '"Watch"', message: '"Snipers on the roof, sir!"' } },
It's a piece of my Gruntfile ;)
Hi Alex,
Thank you, working nice on Windows 10 ! :) (i'll test on W7 tomorrow :D)
https://github.com/dylang/grunt-notify/pull/113