You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by ag...@apache.org on 2013/12/05 19:35:37 UTC
git commit: CB-5034 document registry functions in plugman
Updated Branches:
refs/heads/master feee3dfef -> 8ff33d57e
CB-5034 document registry functions in plugman
Project: http://git-wip-us.apache.org/repos/asf/cordova-plugman/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugman/commit/8ff33d57
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugman/tree/8ff33d57
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugman/diff/8ff33d57
Branch: refs/heads/master
Commit: 8ff33d57e22837972ec1dcf577bec2761a5520dc
Parents: feee3df
Author: mbillau <mi...@gmail.com>
Authored: Wed Oct 23 14:12:40 2013 -0400
Committer: Andrew Grieve <ag...@chromium.org>
Committed: Thu Dec 5 13:35:32 2013 -0500
----------------------------------------------------------------------
README.md | 24 ++++++++++++++++++++----
doc/help.txt | 8 ++++----
2 files changed, 24 insertions(+), 8 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/8ff33d57/README.md
----------------------------------------------------------------------
diff --git a/README.md b/README.md
index 3bc886d..df95075 100644
--- a/README.md
+++ b/README.md
@@ -30,6 +30,10 @@ You must have `git` on your PATH to be able to install plugins directly from rem
* Windows Phone (7+8)
## Command Line Usage
+ plugman help
+
+* Displays all available plugman commands
+
plugman install --platform <ios|android|blackberry10|wp7|wp8> --project <directory> --plugin <name|url|path> [--plugins_dir <directory>] [--www <directory>] [--variable <name>=<value> [--variable <name>=<value> ...]]
plugman uninstall --platform <ios|android|blackberr10|wp7|wp8> --project <directory> --plugin <id> [--www <directory>] [--plugins_dir <directory>]
@@ -40,13 +44,25 @@ You must have `git` on your PATH to be able to install plugins directly from rem
* `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`.
* `--uninstall`: Uninstalls an already-`--install`'ed plugin from a cordova project. Specify the plugin ID.
-Other parameters:
+Other parameters:
* `--plugins_dir` defaults to `<project>/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](plugin_spec.md) for more information.
+
+ plugman search <plugin keywords>
+
+* Search the [Plugin registry](http://plugins.cordova.io) for plugin id's that match the given space separated list of keywords.
+
+
+ plugman config set registry <url-to-registry>
+ plugman config get registry
+
+* 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.
+
## Node Module Usage
+This section details how to consume Plugman as a node module and is only for Cordova tool authors and other hackers. You should not need to read this section if you are just using Plugman to manage a Cordova project.
node
> require('plugman')
@@ -70,7 +86,7 @@ Installs a plugin into a specified cordova project of a specified platform.
* `id`: a string representing the `id` of the plugin, a path to a cordova plugin with a valid `plugin.xml` file, or an `https://` or `git://` url to a git repository of a valid cordova plugin or a plugin published to the Cordova registry
* `plugins_dir`: path to directory where plugins will be stored, defaults to `<project_dir>/cordova/plugins`
* `subdir`: subdirectory within the plugin directory to consider as plugin directory root, defaults to `.`
- * `cli_variables`: an object mapping cordova plugin specification variable namess (see [plugin specification](plugin_spec.md)) to values
+ * `cli_variables`: an object mapping cordova plugin specification variable namess (see [plugin specification](plugin_spec.md)) to values
* `www_dir`: path to directory where web assets are to be copied to, defaults to the specified project directory's `www` dir (dependent on platform)
* `callback`: callback to invoke once complete. If specified, will pass in an error object as a first parameter if the action failed. If not and an error occurs, `plugman` will throw the error
@@ -85,7 +101,7 @@ Uninstalls a previously-installed cordova plugin from a specified cordova projec
* `id`: a string representing the `id` of the plugin
* `plugins_dir`: path to directory where plugins are stored, defaults to `<project_dir>/cordova/plugins`
* `subdir`: subdirectory within the plugin directory to consider as plugin directory root, defaults to `.`
- * `cli_variables`: an object mapping cordova plugin specification variable namess (see [plugin specification](plugin_spec.md)) to values
+ * `cli_variables`: an object mapping cordova plugin specification variable namess (see [plugin specification](plugin_spec.md)) to values
* `www_dir`: path to directory where web assets are to be copied to, defaults to the specified project directory's `www` dir (dependent on platform)
* `callback`: callback to invoke once complete. If specified, will pass in an error object as a first parameter if the action failed. If not and an error occurs, `plugman` will throw the error
@@ -141,7 +157,7 @@ Searches plugins in the registry. `search_opts` is an array of keywords
### `config` method
Configures registry settings. `params` is an array that describes the action
- /*
+ /*
* var params = ['get', 'registry'];
* var params = ['set', 'registry', 'http://registry.cordova.io'];
* module.exports = function(params, callback) {
http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/8ff33d57/doc/help.txt
----------------------------------------------------------------------
diff --git a/doc/help.txt b/doc/help.txt
index 4c254ac..0c6ad7a 100644
--- a/doc/help.txt
+++ b/doc/help.txt
@@ -8,7 +8,7 @@ Install a plugin
$ plugman install --platform <platform> --project <directory> --plugin <plugin> [--variable NAME=VALUE]
-Parameters:
+Parameters:
- platform <platform>: One of android, ios, blackberry10, wp7 or wp8
- project <directory>: Path reference to a cordova-generated project of the platform you specify
@@ -36,7 +36,7 @@ Optional flags
--help|-h : Displays this message
- --version|-v : Displays version
+ --version|-v : Displays version
Interacting with the registry
=============================
@@ -59,7 +59,7 @@ Unpublish a plugin
Search for a plugin
-------------------
- $ plugman search plugin,keywords
+ $ plugman search <keyword1 keyword2 ...>
Display plugin information
-----------------------
@@ -75,6 +75,6 @@ Manage registry configuration
Manage owners
-------------
- $ plugman owner ls org.apache.cordova.core.file
+ $ plugman owner ls org.apache.cordova.core.file
$ plugman owner add username org.apache.cordova.core.file
$ plugman owner rm username org.apache.cordova.core.file