Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 5369F200C8F for ; Thu, 4 May 2017 17:01:49 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 523C3160BCA; Thu, 4 May 2017 15:01:49 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 8F111160BDC for ; Thu, 4 May 2017 17:01:46 +0200 (CEST) Received: (qmail 56617 invoked by uid 500); 4 May 2017 15:01:45 -0000 Mailing-List: contact commits-help@cordova.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list commits@cordova.apache.org Received: (qmail 54355 invoked by uid 99); 4 May 2017 15:01:43 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 04 May 2017 15:01:43 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 3C0D6F170C; Thu, 4 May 2017 15:01:43 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: steven@apache.org To: commits@cordova.apache.org Date: Thu, 04 May 2017 15:02:14 -0000 Message-Id: <90303d8a8bb045e8a3dafaa3a0ff51c9@git.apache.org> In-Reply-To: <3e791b260d0449d098fee1245c485dce@git.apache.org> References: <3e791b260d0449d098fee1245c485dce@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [33/52] [abbrv] [partial] docs commit: CB-12747: added 7.x docs archived-at: Thu, 04 May 2017 15:01:49 -0000 http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/5ad93d20/www/docs/en/7.x/platform_plugin_versioning_ref/index.md ---------------------------------------------------------------------- diff --git a/www/docs/en/7.x/platform_plugin_versioning_ref/index.md b/www/docs/en/7.x/platform_plugin_versioning_ref/index.md new file mode 100644 index 0000000..653933a --- /dev/null +++ b/www/docs/en/7.x/platform_plugin_versioning_ref/index.md @@ -0,0 +1,246 @@ +--- +license: > + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. + +title: Platforms and Plugins Version Management +toc_title: Manage versions and platforms +description: How to manage platforms and Cordova CLI versions. +--- + +# Platforms and Plugins Version Management +From version 4.3.0 onwards, Cordova provides the ability to save and restore platforms and plugins. + +This feature allows developers to save and restore their app to a known state without having to check in all of the platform and plugin source code. + +When adding a platform or plugin, details about the app's platform and plugin versions are automatically saved in config.xml and package.json. It is possible to add a platform or plugin by editing package.json or config.xml directly, assuming you know the right tags + syntax. It is not possible to remove plugins or platforms in this manner. The recommended method of adding and removing plugins and platforms is with the command line cordova commands `cordova plugin add|remove ...` and `cordova platform add|remove ...` to avoid any out of sync issues. + +The 'restore' step happens automatically when a **'cordova prepare'** is issued, making use of information previously saved in the config.xml and package.json files. + +One scenario where save/restore capabilities come in handy is in large teams that work on an app, with each team member focusing on a platform or plugin. This feature makes it easier to share the project and reduce the amount of redundant code that is checked in the repository. + + +## Platform Versioning + +### Saving platforms +To save a platform, you issue the following command : + +```bash +$ cordova platform add ] | directory | git_url> +``` + +After running the above command, the resulting config.xml looks like : + +```xml + + ... + + ... + +``` +After running the above command, the resulting package.json looks like : + +```bash +"cordova": {"platforms": ["android"]},"dependencies": {"cordova-android": "^4.0.0"} +``` +The '--nosave' flag prevents adding and deleting specified platforms from config.xml and package.json. To prevent saving a platform, you issue the following command : + +```bash +$ cordova platform add ] | directory | git_url> --nosave +``` + +Some examples : + + * **'cordova platform add android'** => retrieves the pinned version of the android platform, adds it to the project and then updates config.xml and package.json. + * **'cordova platform add android@3.7.0'** => retrieves the android platform, version 3.7.0 from npm, adds it to the project and then updates config.xml and package.json. + * **'cordova platform add https://github.com/apache/cordova-android.git'** => npm installs the specified cordova-android from the git repository, adds the android platform to the project, then updates config.xml and package.json and points its version to the specified git-url. + * **'cordova platform add C:/path/to/android/platform'** => retrieves the android platform from the specified directory, adds it to the project, then updates config.xml and package.json and points to the directory. + * **'cordova platform add android --nosave'** => retrieves the pinned version of the android platform, adds it to the project, but does not add it to config.xml or package.json. + * **'cordova platform remove android --nosave'** => removes the android platform from the project, but does not remove it from config.xml or package.json. + +### Mass saving platforms on an existing project +If you have a pre-existing project and you want to save all the currently added platforms in your project, you can use : + +```bash +$ cordova platform save +``` + +### Updating / Removing platforms +It is also possible to update/delete from config.xml and package.json during the commands 'cordova platform update' and 'cordova platform remove' : + +```bash +$ cordova platform update ] | directory | git_url> --save +$ cordova platform remove +``` + +Some examples : + + * **'cordova platform update android --save'** => In addition to updating the android platform to the pinned version, update config.xml entry + * **'cordova platform update android@3.8.0 --save'** => In addition to updating the android platform to version 3.8.0, update config.xml entry + * **'cordova platform update /path/to/android/platform --save'** => In addition to updating the android platform to version in the folder, update config.xml entry + * **'cordova platform remove android'** => Removes the android platform from the project and deletes its entry from config.xml and package.json. + + +### Restoring platforms + +Platforms are automatically restored from package.json and config.xml when the **'cordova prepare'** command is run. After prepare is run, package.json and config.xml should contain identical platforms and versions. + +If you add a platform without specifying a version/folder/git_url, the version to install is taken from package.json or config.xml, **if found**. In case of conflicts, package.json is given precedence over config.xml. + +Example: + +Suppose your config.xml file contains the following entry: + +```xml + + ... + + ... + +``` + +If you run the command **'cordova platform add android'** (no version/folder/git_url specified), the platform 'android@3.7.0' (as retrieved from config.xml) will be installed. + +**Example for order of precedence for restoring platforms:** + +Suppose your config.xml has this platform and version: +```bash + +``` + +Suppose your package.json has this platform and version: + +```bash +"cordova": {"platforms": ["android"]},"dependencies": {"cordova-android": "4.0.0"} +``` + +When prepare is run, package.json’s contents are giving precedence and both config.xml and package.json are updated so that they have identical platforms and variables. Notice how package.json's version (4.0.0) has **replaced** config.xml's version (1.0.0). + +After running **'cordova prepare'** , the resulting config.xml looks like : +```bash + +``` + +After running **'cordova prepare'** , the resulting package.json looks like : +```bash +"cordova": {"platforms": ["android",]},"dependencies": {"cordova-android": "4.0.0"} +``` +--- + +## Plugin Versioning +_(The plugin commands are a mirror of the platform commands)_ + +### Saving plugins +To save a plugin, you issue the following command : + +```bash +$ cordova plugin add ] | directory | git_url> +``` + +After running the above command, the resulting config.xml looks like : + +```xml + + ... + + ... + +``` + +After running the above command, the resulting package.json looks like : + +```bash +"cordova": {"plugins": ["cordova-plugin-console"]},"dependencies": {"cordova-plugin-console": "^1.0.0"} +``` + +The '--nosave' flag prevents adding and deleting specified plugins from config.xml and package.json. To prevent saving a plugin, you issue the following command : + +```bash +$ cordova plugin add ] | directory | git_url> --nosave +``` + +Some examples : + + * **'cordova plugin add cordova-plugin-console'** => retrieves the pinned version of the console plugin, adds it to the project and then updates config.xml and package.json. + * **'cordova plugin add cordova-plugin-console@0.2.13'** => retrieves the android plugin, version 0.2.13 from npm, adds it to the project and then updates config.xml and package.json. + * **'cordova plugin add https://github.com/apache/cordova-plugin-console.git'** => npm installs specified console plugin from the git repository, adds the console plugin to the project, then updates config.xml and and package.json and points its version to the specified git-url. + * **'cordova plugin add C:/path/to/console/plugin'** => retrieves the console plugin from the specified directory, adds it to the project, then updates config.xml and package.json and points to the directory. + +### Mass saving plugins on an existing project +If you have a pre-existing project and you want to save all currently added plugins in the project, you can use : + +```bash +$ cordova plugin save +``` + + +### Removing plugins +It is also possible to delete from config.xml and package.json during the command 'cordova plugin remove' : + +```bash +$ cordova plugin remove +``` +For example: + + * **'cordova plugin remove cordova-plugin-console'** => Removes the console plugin from the project and deletes its entry from config.xml and package.json. + + +### Restoring plugins + +Plugins are automatically restored from package.json and config.xml when the **'cordova prepare'** command is run. After prepare is run, package.json and config.xml should contain identical plugins and versions. + +If you add a plugin without specifying a version/folder/git_url, the version to install is taken from package.json or config.xml, **if found**. In case of conflicts, package.json is given precedence over config.xml. + +Example: + +Suppose your config.xml file contains the following entry: + +```xml + + ... + + ... + +``` + +If you run the command **'cordova plugin add cordova-plugin-console'** (no version/folder/git_url specified), the plugin 'cordova-plugin-console@0.2.11' (as retrieved from config.xml) will be installed. + +**Example for order of precedence for restoring plugins:** + +Supposed your config.xml has this plugin and version: + +```bash + +``` +Suppose your package.json has this plugin and version: + +```bash +"cordova": {"plugins": {"cordova-plugin-splashscreen" : {} } },"dependencies": {"cordova-plugin-splashscreen": "1.0.0"} +``` +When prepare is run, package.json’s contents are giving precedence and both config.xml and package.json are updated so that they have identical plugins and variables. Notice how package.json's version (1.0.0) is now in config.xml. + +After running **'cordova prepare'** , the resulting config.xml looks like : + +```bash + +``` + +After running **'cordova prepare'** , the resulting package.json looks like : + +```bash +"cordova": {"plugins": {"cordova-plugin-splashscreen" : {} } },"dependencies": {"cordova-plugin-splashscreen": "1.0.0"} +``` \ No newline at end of file http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/5ad93d20/www/docs/en/7.x/plugin_ref/plugman.md ---------------------------------------------------------------------- diff --git a/www/docs/en/7.x/plugin_ref/plugman.md b/www/docs/en/7.x/plugin_ref/plugman.md new file mode 100644 index 0000000..dd95cb1 --- /dev/null +++ b/www/docs/en/7.x/plugin_ref/plugman.md @@ -0,0 +1,277 @@ +--- +license: > + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. + +title: Using Plugman to Manage Plugins +toc_title: Use Plugman +description: Manage plugins without the CLI when using the platform-centered workflow. +--- + +# Using Plugman to Manage Plugins + +From version 3.0 onward, Cordova implements all device APIs as +plugins, and leaves them disabled by default. It also supports two +different ways to add and remove plugins, depending on your choice of +workflow discussed in the [Overview](../guide/overview/index.html): + +- If you use a cross-platform workflow, you use the `cordova` CLI + utility to add plugins, as described in [The Command-Line Interface](../guide/cli/index.html). + The CLI modifies plugins for all specified platforms at once. + +- If you use a platform-centered workflow, you use a lower-level + [Plugman](https://github.com/apache/cordova-plugman/) command-line + interface, separately for each targeted platform. + +This section details the Plugman utility. For more information on +consuming Plugman as a node module or modifying the source code, see +[the README file in its repository](https://github.com/apache/cordova-plugman/blob/master/README.md). + +## Installing Plugman + +To install plugman, you must have [node](http://nodejs.org/) installed +on your machine. Then you can run the following command from anywhere +in your environment to install plugman globally, so that it is +available from any directory: + + $ npm install -g plugman + +You must have also have `git` on your `PATH` to be able to install plugins directly from remote git URLs. + +__TIP__: If you find that after installing plugman with `npm` you are +still unable to run any `plugman` commands, make sure that you have +added the `/npm/` directory into your `PATH`. + +__NOTE__: You can skip this step if you don't want to pollute your +global `npm` namespace by installing Plugman globally. If this is the +case, then when you create a Cordova project with the shell tools, +there will be a `node_modules` directory inside your project which +contains Plugman. Since you did not install globally, you need to +invoke `node` for each Plugman command, for example `node +./node_modules/plugman/main.js -version`. The rest of this guide +assumes you have installed Plugman globally, meaning you can invoke it +with just `plugman`. + +## Create a Cordova Project + +Before you can use Plugman, you must create a Cordova project. You can do this with either the Command-line Interface or with +the lower level shell scripts. Instructions for using the shell scripts to create your project are located in the various "Command-line Tools" guides +listed on the Platform guides page. + +## Adding a Plugin + +Once you have installed Plugman and have created a Cordova project, you can start adding plugins to the platform with: + +```bash +$ plugman install --platform --project --plugin [--plugins_dir ] [--www ] [--variable = [--variable = ...]] +``` + +Using minimum parameters, this command installs a plugin into a cordova project. You must specify a platform and cordova project location for that platform. You also must specify a plugin, with the different `--plugin` parameter forms being: + + * `name`: The directory name where the plugin contents exist. This must be an existing directory under the `--plugins_dir` path (see below for more info) or a plugin in the Cordova registry. + * `url`: A URL starting with https:// or git://, pointing to a valid git repository that is clonable and contains a `plugin.xml` file. The contents of this repository would be copied into the `--plugins_dir`. + * `path`: A path to a directory containing a valid plugin which includes a `plugin.xml` file. This path's contents will be copied into the `--plugins_dir`. + +Other parameters: + +* `--plugins_dir` defaults to `/cordova/plugins`, but can be any directory containing a subdirectory for each fetched plugin. +* `--www` defaults to the project's `www` folder location, but can be any directory that is to be used as cordova project application web assets. +* `--variable` allows to specify certain variables at install time, necessary for certain plugins requiring API keys or other custom, user-defined parameters. Please see the [plugin specification](spec.md.html#Plugin%20Specification) for more information. + +## Remove a Plugin + +To uninstall a plugin, you simply pass the `uninstall` command and provide the plugin ID. + +```bash +$ plugman uninstall --platform --project --plugin [--www ] [--plugins_dir ] +``` + + +## Help Commands + +Plugman features a global help command which may help you if you get stuck or are experiencing problems. It will display +a list of all available Plugman commands and their syntax: + +```bash +plugman -help +plugman # same as above +``` + +**NOTE**: `plugman -help` may show some additional registry-related commands. These commands are for plugin developers and may not be implemented on third-party plugin registries. + + +You can also append the `--debug|-d` flag to any Plugman command to run that command in verbose mode, which will display +any internal debugging messages as they are emitted and may help you track down problems like missing files. + +```bash +# Adding Android battery-status plugin to "myProject": +plugman -d --platform android --project myProject --plugin cordova-plugin-battery-status +``` + +Finally, you can use the `--version|-v` flag to see which version of Plugman you are using. + +```bash +plugman -v +``` + +## Registry Actions + +There are a number of plugman commands that can be used for interacting with the [Plugin registry](http://plugins.cordova.io). +Please note that these registry commands are specific to the _plugins.cordova.io_ plugin registry and may not be implemented by +third-party plugin registries. + +### Searching for a Plugin + +You can use Plugman to search the [Plugin registry](http://plugins.cordova.io) for plugin id's that match the given space separated list of keywords. + +```bash +plugman search +``` + +### Changing the Plugin Registry + +You can get or set the URL of the current plugin registry that plugman is using. Generally you should leave this set at http://registry.cordova.io unless you want to use a third party plugin registry. + +```bash +plugman config set registry +plugman config get registry +``` + +### Get Plugin Information + +You can get information about any specific plugin stored in the plugin repository with: + +```bash +plugman info +``` + +This will contact the plugin registry and fetch information such as the plugin's version number. + +## Installing Core Plugins + +The examples below show how to add plugins as needed so that any +Cordova APIs you use in your project still work after you upgrade to +version 3.0. For each command, you need to select the target +platform, and reference the platform's project directory. + +* cordova-plugin-battery-status + + ```bash + plugman install --platform --project --plugin cordova-plugin-battery-status + ``` + +* cordova-plugin-camera + + ```bash + plugman install --platform --project --plugin cordova-plugin-camera + ``` + +* cordova-plugin-console + + ```bash + plugman install --platform --project --plugin cordova-plugin-console + ``` + +* cordova-plugin-contacts + + ```bash + plugman install --platform --project --plugin cordova-plugin-contacts + ``` + +* cordova-plugin-device + + ```bash + plugman install --platform --project --plugin cordova-plugin-device + ``` + +* cordova-plugin-device-motion (accelerometer) + + ```bash + plugman install --platform --project --plugin cordova-plugin-device-motion + ``` + +* cordova-plugin-device-orientation (compass) + + ```bash + plugman install --platform --project --plugin cordova-plugin-device-orientation + ``` + +* cordova-plugin-dialogs + + ```bash + plugman install --platform --project --plugin cordova-plugin-dialogs + ``` + +* cordova-plugin-file + + ```bash + plugman install --platform --project --plugin cordova-plugin-file + ``` + +* cordova-plugin-file-transfer + + ```bash + plugman install --platform --project --plugin cordova-plugin-file-transfer + ``` + +* cordova-plugin-geolocation + + ```bash + plugman install --platform --project --plugin cordova-plugin-geolocation + ``` + +* cordova-plugin-globalization + + ```bash + plugman install --platform --project --plugin cordova-plugin-globalization + ``` + +* cordova-plugin-inappbrowser + + ```bash + plugman install --platform --project --plugin cordova-plugin-inappbrowser + ``` + +* cordova-plugin-media + + ```bash + plugman install --platform --project --plugin cordova-plugin-media + ``` + +* cordova-plugin-media-capture + + ```bash + plugman install --platform --project --plugin cordova-plugin-media-capture + ``` + +* cordova-plugin-network-information + + ```bash + plugman install --platform --project --plugin cordova-plugin-network-information + ``` + +* cordova-plugin-splashscreen + + ```bash + plugman install --platform --project --plugin cordova-plugin-splashscreen + ``` + +* cordova-plugin-vibration + + ```bash + plugman install --platform --project --plugin cordova-plugin-vibration + ``` http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/5ad93d20/www/docs/en/7.x/plugin_ref/spec.md ---------------------------------------------------------------------- diff --git a/www/docs/en/7.x/plugin_ref/spec.md b/www/docs/en/7.x/plugin_ref/spec.md new file mode 100644 index 0000000..8168621 --- /dev/null +++ b/www/docs/en/7.x/plugin_ref/spec.md @@ -0,0 +1,655 @@ +--- +license: > + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. + +title: Plugin.xml reference documentation +toc_title: Plugin.xml +description: List of supported tags in the plugin.xml file. +--- + +# Plugin.xml + +Plugin.xml file defines the structure and settings required for your plugin. It has several elements to provide details about your plugin. + +# plugin + +The `plugin` element is the plugin manifest's top-level element. + +Attributes(type)
Only for platform: | Description +---------------- | ------------ +xmlns(string) | *Required*
The plugin namespace, `http://apache.org/cordova/ns/plugins/1.0`. If the document contains XML from other namespaces, such as tags to be added to the `AndroidManifest.xml` file in the case of Android, those namespaces should also be included in the element. +id(string) | *Required*
A npm-style identifier for the plugin. +version(string) | *Required*
A version number for the plugin. [Semver](http://semver.org/) syntax is supported. + +Example: +```xml + + +``` + +## engines and engine + +The child elements of the `` element specify versions of Apache Cordova-based frameworks that this plugin supports. The CLI aborts with a non-zero code for any plugin whose target project does not meet the engine's constraints. If no tags are specified, the CLI attempts to install into the specified cordova project directory blindly. + +>NOTE: In **Cordova 6.1.0+**, the recommended place to specify platform, plugin, and CLI dependencies +>is in a plugin's `package.json`. See [specifying Cordova dependencies](../guide/hybrid/plugins/index.html#specifying-cordova-dependencies) +>for more information + +Attributes(type)
Only for platform: | Description +---------------- | ------------ +name(string) | *Required*
Name of the engine. Here are the default engines that are supported :
  • `cordova`
  • `cordova-plugman`
  • `cordova-android`
  • `cordova-ios`
  • `cordova-blackberry10`
  • `cordova-wp8`
  • `cordova-windows`
  • `cordova-osx`
  • `windows-os`
  • `android-sdk` (returns the highest Android api level installed)
  • `windows-sdk` (returns the native windows SDK version)
  • `apple-xcode` (returns the xcode version)
  • `apple-ios` (returns the highest iOS version installed)
  • `apple-osx` (returns the OSX version)
  • `blackberry-ndk` (returns the native blackberry SDK version)
  • You can also specify a custom framework apart from the default ones. +version(string) | *Required*
    The version that your framework must have in order to install. Semver syntax is supported. +scriptSrc(string) | **For custom frameworks only**
    *Required*
    The script file that tells plugman the version of the custom framework. Ideally, this file should be within the top level directory of your plugin directory. +platform(string) | **For custom frameworks only**
    *Required*
    The platforms your framework supports. You may use the wildcard `*` to say supported for all platforms, specify multiple with a pipe character like `android|ios|blackberry10` or just a single platform like `android`. + +Examples: +```xml + + + +``` + +Engine elements may also specify fuzzy matches using '>', '>=' etc. to avoid repetition, and to reduce maintenance when the underlying platform is updated. +```xml + + + +``` + +The `` tags also has default support for all of the main platforms Cordova exists on. Specifying the cordova engine tag means that all versions of Cordova on any platform must satisfy the engine version attribute. You may also list specific platforms and their versions in order to override the catch-all cordova engine: +```xml + + + + + +``` + +Custom frameworks example: +```xml + + + + + +``` + +## name + +The `name` element is used to specify the name of the plugin. This element does not (yet) handle localization. + +Example: +```xml +Foo +``` + +## description + +The `description` element is used to specify the description of the plugin. This element does not (yet) handle localization. + +Example: +```xml +Foo plugin description +``` + +## author + +The content of the `author` element contains the name of the plugin author. + +Example: +```xml +Foo plugin author +``` + +## keywords + +The content of the `keywords` element contains comma separated keywords to describe the plugin. + +Example: +```xml +foo,bar +``` + +## license + +This element is used to specify the license of the plugin. + +Example: +```xml +Apache 2.0 License +``` + +## asset + +This element is used to list the files or directories to be copied into a Cordova app's `www` directory. Any `` elements that are nested within `` elements specify platform-specific web assets. + +Attributes(type)
    Only for platform: | Description +---------------- | ------------ +src(string) | *Required*
    Where the file or directory is located in the plugin package, relative to the `plugin.xml` document. If a file does not exist at the specified src location, the CLI stops and reverses the installation process, issues a notification about the conflict, and exits with a non-zero code. +target(string) | *Required*
    Where the file or directory should be located in the Cordova app, relative to the `www` directory. If a file already exists at the target location, the CLI stops and reverses the installation process, issues a notification about the conflict, and exits with a non-zero code. + +Examples: +```xml + + + + +``` + +Assets can be targeted to subdirectories as well. This will create the `js/experimental` directory within the `www` directory, unless already present, and copy the `new-foo.js` file and renames it to `foo.js`. +```xml + +``` + +## js-module + +Most plugins include one or more JavaScript files. Each `` tag corresponds to a JavaScript file, and prevents the plugin's users from having to add a `