cordova-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Patrick Mueller <>
Subject Re: CB-280 - Improve layout of cordova-js scripts
Date Thu, 22 Mar 2012 15:06:09 GMT
On Thu, Mar 22, 2012 at 09:48, Drew Walters <> wrote:

>    'platform specific' files overwrite any 'common' files,
>    per the order of the cp commands above.
> This makes sense though we need to strive for platforms not overriding
> 'common' files since that negates the benefit of cordova-js common
> API.

I would agree that we don't folks overriding a lot of the common stuff, but
it's nice to have a safety valve.  The safety valve is now testable,
because I'm shipping exec.js and platform.js in common, which throw errors.
 So these files are EXPECTED to be overridden.  For Smalltalkers, this is
"self subclassResponsibility" all over again (codifying that something is
meant to be overrriden).

> We do however need to provide mechanisms for the following:
> ...3. Platforms need to be able to proxy exec to a javascript

implementation as opposed to native.  This feature does not yet exist,
> so platforms are using the "merges" object which overrides existing
> API definition.

Overriding exec.js is the way to do this, right?  In fact, the 'test' and
'errgen' platforms already do this today.  Or am I missing something?

> The reason I am mentioning the above is that if we refactored the code
> as shown in your commit, then we need to rename files currently using
> the "merges" approach as they would override common when they are
> intended to augment common.

I don't think the previous packager.js had any special magic foo to do
these merges, so I don't think anything has changed in this regard.  Or
maybe I'm misunderstanding.  Can you point me to the place in the old
packager.js where "merges" are happening:

Patrick Mueller

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