cordova-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrew Grieve <agri...@chromium.org>
Subject Re: Proposal for JS in Plugins
Date Wed, 06 Feb 2013 19:51:28 GMT
On Wed, Feb 6, 2013 at 2:33 PM, Filip Maj <fil@adobe.com> wrote:

> I've added a few detail explanations to the document, but moved the
> discussion to the ML.
>
> ----
>
> > Should be easy to install / remove plugins (no need to manually
> >add/remove script tags)
>
>
> I think adding/removing script tags is the way to go. Concatenating all
> javascript relevant to your project (cordova.js + any plugins you add)
> makes it difficult to debug later on. WE'd have to get users to post
> entire contents of their cordova.js file to determine what was added and
> what exists in there. With that in mind, I favor the packager approach,
> which would require:
>

Very good point about concat making it hard to track bugs! I wonder if
there's a better way than requiring users to manually add the tags (we
don't require them to manually add native files to their project files).

One thought is to have cordova-packer output source-maps. I don't think
there's very good support for them in mobile browsers yet, but we could use
them to manually map exception line numbers to file+line numbers.

Another idea is to use exec + special comment that is used in our existing
pkg/debug/*.js files. I don't think support for this is all that great
either though.

Another idea is to have cordova.js inject a script tag for each module.
This may have an adverse effect on start-up time, but probably no worse
than if the user manually adds all of the script tags separately. Winner?



>
> > declaring JS symbol mapping and JS dependencies in plugin.xml
>
> +1 to that bit. We should add it to the wiki page on plugin design if
> everyone agrees on it.
>
> On 2/6/13 10:46 AM, "Andrew Grieve" <agrieve@chromium.org> wrote:
>
> >Bump
> >
> >
> >On Mon, Feb 4, 2013 at 4:47 PM, Andrew Grieve <agrieve@chromium.org>
> >wrote:
> >
> >> I've taken the result of the previous thread of
> >>CB-2214<https://issues.apache.org/jira/browse/CB-2214>,
> >> and turned it into a proposal doc:
> >>
> >>
> >>
> >>
> https://docs.google.com/document/d/1Evzu8qliwxBWGj9-U8ea1rvrbd-jokmN4Dti8
> >>AGAXdU/edit#
> >>
> >> Please feel free to add comments / edit the proposals.
> >>
>
>

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