cordova-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Filip Maj <>
Subject Re: Import platform specific www-files
Date Thu, 02 May 2013 16:44:52 GMT
Hey Andreas,

If you are the author of the plugin, I would recommend checking out
plugman, which is cordova's tool for installing and uninstalling plugins
automatically into/from a cordova project:;a=summary

In the README, there is a specification for a plugin.xml manifest. This
file describes what makes up your plugin, and the plugman tool uses this
manifest to run the installation and uninstallation. It supports the
following use cases, which seem to align with your objectives:

- <asset> or <js-module> elements that can be nested under a particular
<platform> element, denoting platform-specific web assets or javascript
modules that should be included in the plugin only for certain platforms.
- also has a <config-file> element allowing to automatically add/remove
sections from various cordova and native project configuration files.

For a few examples check out PhoneGap Build's plugins:

They all have a plugin.xml manifest.

On 5/2/13 9:36 AM, "Andreas Sander" <> wrote:

>One further question:
>Is it possible to add the necessary plugin entries into the project plist
>(iOS) and config.xml (android) automatically during build or do I have to
>do this always manually?
>Do I need to specify these settings inside the plugin folder?
>> From:
>> Date: Thu, 2 May 2013 11:55:59 -0400
>> Subject: Re: Import platform specific www-files
>> To:
>> If you are using cordova-cli, there is already a merges/ folder for
>> this.
>> From the README:
>> Platform-specific web assets (HTML, CSS and JavaScript files) are
>> within appropriate subfolders in this directory. These are deployed
>> a prepare to the appropriate native directory. Files placed under
>>merges/ will
>> override matching files in the www/folder for the relevant platform.
>> On Thu, May 2, 2013 at 11:46 AM, Andreas Sander
>> <>wrote:
>> > Hi again ;-),
>> > I use a plugin with different JavaScript files for each platform. Can
>> > somehow, control which of these files are added to which platform
>> > www folder during cordova build?
>> > Or do I need to include both inside the www folder and refer to them
>> > on device.platform?
>> > Greets,
>> > Andreas

View raw message