webhook / webhook-cms

The CMS layer for Webhook.com
http://www.webhook.com
MIT License
178 stars 41 forks source link

New 'supported_messages' grunt message #124

Closed LtSquigs closed 10 years ago

LtSquigs commented 10 years ago

This new message from the generator will return a list of all supported messages that the grunt server that is running support. For older grunt servers this may hang (before we had the catch all) or return undefined (for ones before this message existed).

This can be used to determine what capabilities we can take advantage of given a users grunt server.

Example:

   window.ENV.sendGruntCommand('supported_messages', function(messages) {
        if(messages) {
             // messages is an array, map to some structure to check up later
        }
   });

   /// later
   if(supportedMessages['push'] === true) 
        // Code to use push here