cordova-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrew Grieve <agri...@chromium.org>
Subject Re: Prototype for automatic JS installation in cordova-cli
Date Mon, 25 Feb 2013 18:06:29 GMT
Just to clarify - Braden's prototype doesn't concat plugin js.

I think we're on the same page in terms of concatenating making it hard to
figure out user reports.

What this does is concat the code to inject script tags. Each plugin's code
then lives in their own .js files.


On Mon, Feb 25, 2013 at 12:55 PM, Filip Maj <fil@adobe.com> wrote:

> 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.
>
> [1] http://markmail.org/message/tsbypckth2vcuib3
>
> On 2/25/13 8:20 AM, "Braden Shepherdson" <braden@chromium.org> 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
> >out
> >my fork's auto_js branch and install it. You'll need some ported plugins
> >to
> >install, for which see:
> >https://github.com/MobileChromeApps/refresh
> >
> https://github.com/MobileChromeApps/chrome-cordova/tree/plugins/plugins/so
> >cket
> >
> https://github.com/MobileChromeApps/chrome-cordova/tree/plugins/plugins/st
> >orage
> >
> >I'm pleased with how things turned out, in the code and in the interface.
> >I
> >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.
> >
> >Braden
> >
> >[1]
> >
> https://docs.google.com/document/d/1fhwnIZ5TqwklGx71pLmfSghysls1S4_5ktEsjA
> >9ac5Y/edit
> >[2] https://github.com/apache/cordova-cli/pull/4
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message