I've added more comments to CB-4609 about this. tl;dr use a post-prepare
hook for this kind of custom behavior.

Braden


On Wed, Nov 6, 2013 at 8:47 AM, Jonathan Bond-Caron <jbo...@gdesolutions.com
> wrote:

> On Wed Nov 6 01:54 AM, Darryl Pogue wrote:
> > On 5 November 2013 13:37, Braden Shepherdson <bra...@chromium.org>
> > wrote:
> > >
> > > Why is any development here happening outside of Cordova? Most apps
> > > are going to depend on Cordova APIs too deeply to get all that far
> > > with the early steps in your outline.
> > >
> > > Braden
> >
> > My approach when developing multi-platform apps is to think of the core
> > cordova.js as a polyfill manager, and the plugins as polyfills for
> features that
> > might not exist yet.
> >
> > To that end, I took the firefoxos platform of cordova.js from 3.1.0 and
> very
> > slightly modified it and saved it as a "browser" platform[1]. I put the
> resulting
> > cordova.js in my www folder so I can run it in the browser without any
> cordova
> > prepare commands, and when I do make a build for a device, it gets
> overwritten
> > by the platform-specific JS file.
> >
>
> Same approach :)  There's 3 issues for that type of workflow inside
> Cordova:
>
> 1) No unified cordova.js for the browser
>
> Not sure if it makes more sense as a separate 'platform', or just a file
> built from cordova-js
> See: http://goo.gl/fvNkmh
>
> 2) Version control is tricky
>
> If you use 'codova create', it's a bit unclear what part of the
> application should be under version control, only the www/ folder?
> If you target 4 platforms, you have 4 versions of the app in the
> platforms/ folder.
>
> So right now, I prefer to consider the application outside of Cordova.
>
>  3) App layout
>
> This is probably more specific to my case, both cli and plugman expect the
> layout of an app to be:
> www/cordova.js
> www/cordova_plugins.js
> www/plugins
>
> https://issues.apache.org/jira/browse/CB-4609
>
> Would prefer that to be configurable as for example:
> www/resources/js/cordova.js
> www/resources/js/cordova_plugins.js
> www/resources/js/plugins
>
> Main reason is I have additional build tools (minification etc...) that
> expect this layout.
>
>

Reply via email to