Toura/mulberry — Issue #241: Support for vendor scripts
Author: futuraprime
Created: 2012-01-04 20:03:07+00:00
State: open

In setting up Backbone for inclusion in Mulberry, I created a `vendor` directory under `javascript` in the app, and then created a `backbone` directory there to put the backbone and underscore scripts in. I also added dojo.provide lines to each (e.g. `dojo.provide('client.vendor.backbone.underscore');`). Two questions follow from this:

1. Is this the "best practice" for loading in separate libraries?
2. Should we automate this on the command line?

An automated version might look like `mulberry import vendor_script /path/to/vendorscript.js packagename`, which would find or create a directory `packagename`, copy `vendorscript.js` to it, and prepend the dojo.provide line (or return a warning if it's already got a dojo.provide).