cordova-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Filip Maj <>
Subject Re: Prototype for automatic JS installation in cordova-cli
Date Mon, 25 Feb 2013 17:55:40 GMT
Sweet! Thanks for putting this together Braden. I now have something to
play with on the flight to Portland this afternoon :D

Related, we had spoke a few months ago [1] about what to do with plugin
installation and inclusion of plugin JS (as either concat'ed to cordova.js
or with new script tags added to html files). We never really got to a
solid conclusion but it seems like concatenation was the general consensus.

The concern with concating is issue tracking will be hard (my cordova.js
is different from yours). Brian brought up a good point in [1] that the
config.xml ends up being a manifest that summarizes what your cordova.js
should look like. While this helps, then we keep going up the slope once
we hit different plugin versions.. Likely in the end we will need users to
upload their cordova.js for figuring out plugin versions and whatnot.

Just wanted to reiterate and perhaps bring that back to light.


On 2/25/13 8:20 AM, "Braden Shepherdson" <> wrote:

>I sent around a document[1] outlining my plan for automatically installing
>plugin Javascript files last week. The prototype is complete and in a pull
>request[2] now.
>tl;dr for how this works is: <js-module> tags in the plugin.xml specify
><clobbers>, <merges> and <runs> for each JS file; cordova prepare copies
>the JS files into the platforms and injects code at the end of cordova.js
>to cordova.require the modules and do the clobbering and merging.
>Please take a look and see what you think. If you want to try it, check
>my fork's auto_js branch and install it. You'll need some ported plugins
>install, for which see:
>I'm pleased with how things turned out, in the code and in the interface.
>think this is the right approach for automatic installation. It doesn't
>pollute top-level www, has no risk of collision between plugins or between
>plugins and user code, and uses existing tools like the module mapper.
>Comments welcome.

View raw message