HubSpot / messenger

Growl-style alerts and messages for your app. #hubspot-open-source
http://github.hubspot.com/messenger/
MIT License
4.02k stars 405 forks source link

Customizable Builds #32

Open zackbloom opened 11 years ago

zackbloom commented 11 years ago

It would be cool let people create their own builds of Messenger. The options right now could include:

This may require some modification to the grunt build process to generate all the partial files to be joined (@BennyC).

I'd really like to do it all client-side if possible (FileWriter API?), maybe with a Node fallback? This may warrant it's own OS project.

BennyC commented 11 years ago

Sounds like a cool idea. Similar to the Twitter Bootstrap generation, yeah? Like the idea a lot, unsure if you'll be able to zip/tar using FileWriter, although I haven't really played with it myself. Wouldn't mind helping out with the Node side though! :smiley:

zackbloom commented 11 years ago

I hadn't even thought of generating it as a zip file, but apparently it's possible: http://stuk.github.com/jszip/

My thoughts as to what is required:

  1. Reconfigure grunt to generate the partial files necessary
  2. Write the frontend interface
    • Write the frontend code to download the components, join them together, generate data blob urls (maybe zip them too)
    • Write the backend code (hopefully largely shared with the frontend) to handle this on the server for older browsers. I'm not sure how necessary this is, as data urls are supported everywhere but IE9 and below as far as I know. If we need to use FileWriter it's more limited.
    • (Possibly) Use the node code to make it possible to pregenerate the files so we can host them on cdnjs. If we really do this, it renders the frontend joining kind of unnecessary, but it might be nice for projects with tons of options (a la Bootstrap).

It makes sense to me to do this in another project, maybe as a grunt-contrib?