On 2/6/13 11:51 AM, "Andrew Grieve" <[email protected]> wrote:
>On Wed, Feb 6, 2013 at 2:33 PM, Filip Maj <[email protected]> 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? I don't think the script tag is a giant issue, but I do think it is a slipper slope problem to try and solve. What if the user has a multipage application? Do we then add script tags automatically to all pages? What if the user only uses the plugin on specific pages? Etc etc
