incubator-callback-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Filip Maj <>
Subject Re: [Cordova-JS] Platform-specific plugin directory structure
Date Wed, 18 Apr 2012 00:14:04 GMT
Ahh, so if I update all of the module string Ids and axe the extra
<platform> directory - we are all good, ya? Was wondering if there was
specific reasoning other than "this is how we did it before".

I'll set up an issue (likely 1.8 or after) to do that.

On 4/17/12 5:01 PM, "Patrick Mueller" <> wrote:

>On Tue, Apr 17, 2012 at 19:04, Filip Maj <> wrote:
>> How come we use the following dir structure for platforms:
>> lib
>>  - android
>>  - plugin
>>   - android
>> ...
>Here's how the files / directories are laid out:
>- lib/[platform]/* platform-specific modules for specified platform
>- lib/common/* portable modules
>- lib/script/* JavaScript files which are NOT modules
>- lib/cordova.js - bootstrap JavaScript file
>In the case of the modules, in lib/[platform] and lib/common, the names of
>the file correspond to the module id.  Here are the files in android and
>their respective module ids:
>android/exec.js cordova/exec
>android/platform.js cordova/platform
>android/plugin/android/app.js cordova/plugin/android/app
>android/plugin/android/callback.js cordova/plugin/android/callback
>module ids are what is used as the argument of require()
>Note that the module ids are not encoded in the files, the module ids are
>calculated by the file's location in the file system.  The reason the file
>"android/plugin/android/app.js" exists, is because there is a module with
>the id "cordova/plugin/android/app" that's specific to android.
>That's the way it works today anyway.
>Patrick Mueller

View raw message