You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by st...@apache.org on 2015/04/16 20:07:59 UTC
cordova-lib git commit: CB-8865 fixed plugman.help()
Repository: cordova-lib
Updated Branches:
refs/heads/master 536e8b5f5 -> b18586b72
CB-8865 fixed plugman.help()
Project: http://git-wip-us.apache.org/repos/asf/cordova-lib/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-lib/commit/b18586b7
Tree: http://git-wip-us.apache.org/repos/asf/cordova-lib/tree/b18586b7
Diff: http://git-wip-us.apache.org/repos/asf/cordova-lib/diff/b18586b7
Branch: refs/heads/master
Commit: b18586b7223bd6ec9c5d85ac02e95862e51e92a8
Parents: 536e8b5
Author: Steve Gill <st...@gmail.com>
Authored: Thu Apr 16 11:07:45 2015 -0700
Committer: Steve Gill <st...@gmail.com>
Committed: Thu Apr 16 11:07:45 2015 -0700
----------------------------------------------------------------------
cordova-lib/src/plugman/help.js | 25 +++++
cordova-lib/src/plugman/help.txt | 162 ++++++++++++++++++++++++++++++++
cordova-lib/src/plugman/plugman.js | 1 +
3 files changed, 188 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/b18586b7/cordova-lib/src/plugman/help.js
----------------------------------------------------------------------
diff --git a/cordova-lib/src/plugman/help.js b/cordova-lib/src/plugman/help.js
new file mode 100644
index 0000000..a8b602d
--- /dev/null
+++ b/cordova-lib/src/plugman/help.js
@@ -0,0 +1,25 @@
+/**
+ 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.
+*/
+var fs = require('fs'),
+ path = require('path');
+var doc_txt = path.join(__dirname, 'help.txt');
+
+module.exports = function help() {
+ return fs.readFileSync(doc_txt, 'utf-8');
+};
http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/b18586b7/cordova-lib/src/plugman/help.txt
----------------------------------------------------------------------
diff --git a/cordova-lib/src/plugman/help.txt b/cordova-lib/src/plugman/help.txt
new file mode 100644
index 0000000..021e54a
--- /dev/null
+++ b/cordova-lib/src/plugman/help.txt
@@ -0,0 +1,162 @@
+plugman manages plugin.xml-compatible cordova plugins into cordova-generated projects.
+
+Usage
+=====
+
+To display this help file, use one of the following:
+
+$ plugman --help
+$ plugman -h
+
+To display the plugman version, use one of the following:
+
+ $ plugman --version
+ $ plugman -v
+
+Optional flags
+--------------
+
+ --debug|-d : Verbose mode
+
+Install a plugin
+----------------
+
+ $ plugman install --platform <platform> --project <directory> --plugin <plugin> [--variable NAME=VALUE]
+
+Parameters:
+
+ - platform <platform>: One of android, ios, blackberry10, wp8, or windows8
+ - project <directory>: Path reference to a cordova-generated project of the platform you specify
+ - plugin <plugin>: One of a path reference to a local copy of a plugin, or a remote https: or git: URL pointing to a cordova plugin (optionally append #branch:subdir) or a plugin ID from http://plugins.cordova.io
+ - variable NAME=VALUE: Some plugins require install-time variables to be defined. These could be things like API keys/tokens or other app-specific variables.
+
+ Optional parameters:
+
+ - www <directory>: www assets for the plugin will be installed into this directory. Default is to install into the standard www directory for the platform specified
+ - plugins_dir <directory>: a copy of the plugin will be stored in this directory. Default is to install into the <project directory>/plugins folder
+ - searchpath <directory>: when looking up plugins by ID, look in this directory and each of its subdirectories for the plugin before hitting the registry.
+ Multiple search paths can be used by either specifying the flag multiple times, or by separating paths with a delimiter (: on 'nix, ; on Windows).
+
+Uninstall a plugin
+------------------
+
+ $ plugman uninstall --platform <platform> --project <directory> --plugin <plugin-id>
+
+Parameters:
+
+ - platform <platform>: One of android, ios, blackberry10, wp8, or windows8
+ - project <directory>: Path reference to a cordova-generated project of the platform you specify
+ - plugin <plugin-id>: The plugin to remove, identified by its id (see the plugin.xml's <plugin id> attribute)
+
+
+Interacting with the registry
+=============================
+
+Add a user account
+------------------
+
+ $ plugman adduser
+
+Publish a plugin
+----------------
+
+ $ plugman publish [<directory>]
+
+ - defaults to the current directory
+
+Unpublish a plugin
+------------------
+
+ $ plugman unpublish <name>@<version>
+
+Search for a plugin
+-------------------
+
+ $ plugman search <keyword1 keyword2 ...>
+
+Display plugin information
+--------------------------
+
+ $ plugman info <pluginID>
+
+Manage registry configuration
+-----------------------------
+Display current configuration settings:
+
+ $ plugman config ls
+
+Display the current registry URL:
+
+ $ plugman config get registry
+
+Set registry URL:
+
+ $ plugman config set registry <url>
+
+Example:
+
+ $ plugman config set registry http://localhost:5984/registry/_design/app/_rewrite
+
+Manage Owners
+-------------
+Plugin owners are allowed to publish updates to a plugin. To display a list of owners for a plugin, use:
+
+ $ plugman owner ls <pluginID>
+
+Example:
+
+ $ plugman owner ls org.apache.cordova.core.file
+
+To add an owner to a plugin's in the repository, use:
+
+ $ plugman owner add <username> <pluginID>
+
+Example:
+
+ $ plugman owner add joeuser org.apache.cordova.core.file
+
+To remove an owner from the plugin in the registry, use:
+
+ $ plugman owner rm <username> <pluginID>
+
+Example:
+
+ $ plugman owner rm joeuser org.apache.cordova.core.file
+
+Create A Plugin
+---------------
+
+ $ plugman create --name <pluginName> --plugin_id <pluginID> --plugin_version <version> [--path <directory>] [--variable NAME=VALUE]
+
+Parameters:
+
+ - <pluginName>: The name of the plugin
+ - <pluginID>: An ID for the plugin, ex: org.bar.foo
+ - <version>: A version for the plugin, ex: 0.0.1
+ - <directory>: An absolute or relative path for the directory where the plugin project will be created
+ - variable NAME=VALUE: Extra variables such as description or Author
+
+Add a Package.JSON file to plugin
+---------------------------------
+Creates a package.json file in the plugin based on values from plugin.xml.
+
+ $ plugman createpackagejson <directory>
+
+
+Add a Platform to a Plugin
+--------------------------
+
+ $ plugman platform add --platform_name <platform>
+
+Parameters:
+
+- <platform>: One of android, ios
+
+Remove a Platform from a Plugin
+-------------------------------
+
+ $ plugman platform remove --platform_name <platform>
+
+Parameters:
+
+- <platform>: One of android, ios
http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/b18586b7/cordova-lib/src/plugman/plugman.js
----------------------------------------------------------------------
diff --git a/cordova-lib/src/plugman/plugman.js b/cordova-lib/src/plugman/plugman.js
index 97d4d0d..d964f90 100644
--- a/cordova-lib/src/plugman/plugman.js
+++ b/cordova-lib/src/plugman/plugman.js
@@ -67,6 +67,7 @@ addProperty(plugman, 'uninstall', './uninstall', true);
addProperty(plugman, 'fetch', './fetch', true);
addProperty(plugman, 'prepare', './prepare');
addProperty(plugman, 'prepareBrowserify', './prepare-browserify');
+addProperty(plugman, 'help', './help');
addProperty(plugman, 'config', './config', true);
addProperty(plugman, 'owner', './owner', true);
addProperty(plugman, 'adduser', './adduser', true);
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org