gruntjs / grunt

Grunt: The JavaScript Task Runner
http://gruntjs.com/
Other
12.27k stars 1.5k forks source link

Generic Notifiers #982

Open iamdustan opened 11 years ago

iamdustan commented 11 years ago

Having generic notifiers built into grunt would be awesome. Similar to guard (https://github.com/guard/guard/tree/master/lib/guard/notifiers), only stripped down to just an interface or base for core; then environment specific notifiers would be maintained as their own plugin.

There are already a few notification plugins for systems such as Growl or OSX system notifications, but those are very specific. Having a generic interface in core to provide a notifications system for tmux, emacs, dev tools, system events, irc, et cetera to plug in to would be very nice.

dylang commented 10 years ago

@iamdustan I plan on adding a plugin system to grunt-notify so developers can add support to tools like you list.

If you have ideas for how this should work I'm interested in your suggestions.

I'm also happy to contribute my code to Grunt if the team would like to make part of the Grunt core system.

iamdustan commented 10 years ago

@dylang that would be awesome. I looked at grunt-notify briefly, but it seemed very opinionated/hard-coded towards the system default notifications and a few specific plugins such as jshint.

My real short amount of thought towards the solution was heading in a direction similar to grunt-contrib-watch and PubSub. I don’t know if there would be a good or easy way to automatically bind to individual plugins error/log/interrupt/etc events and pull the args from that (assuming there is an expected or standard way for that to happen currently), but if so that could be really helpful.

uc2dabing commented 10 years ago

@iamdustan Rencently I use grunt && express && socket.io in my frontend Integration solution. I have the same problem how to send msg to the user real-time. I write a grunt plugin to make a socket client, and add hooker to grunt.log.error or writeln (not on the stdout data) so I can communicate with express. whether the idea may help you?