You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by mw...@apache.org on 2013/07/18 21:21:34 UTC

[04/14] docs commit: [CB-3816] add plugin doc to CLI, adapted from new plugman doc

[CB-3816] add plugin doc to CLI, adapted from new plugman doc


Project: http://git-wip-us.apache.org/repos/asf/cordova-docs/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-docs/commit/6ad57379
Tree: http://git-wip-us.apache.org/repos/asf/cordova-docs/tree/6ad57379
Diff: http://git-wip-us.apache.org/repos/asf/cordova-docs/diff/6ad57379

Branch: refs/heads/master
Commit: 6ad57379f2892819863147116e039eac48d7d5ce
Parents: 2fca517
Author: Mike Sierra <le...@gmail.com>
Authored: Wed Jul 17 15:22:51 2013 -0400
Committer: Michael Brooks <mi...@michaelbrooks.ca>
Committed: Thu Jul 18 12:15:21 2013 -0700

----------------------------------------------------------------------
 docs/en/edge/guide/cli/index.md | 70 ++++++++++++++++++++++++++++++++----
 1 file changed, 64 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/6ad57379/docs/en/edge/guide/cli/index.md
----------------------------------------------------------------------
diff --git a/docs/en/edge/guide/cli/index.md b/docs/en/edge/guide/cli/index.md
index 63ad243..d4ad850 100644
--- a/docs/en/edge/guide/cli/index.md
+++ b/docs/en/edge/guide/cli/index.md
@@ -196,16 +196,74 @@ launch from the home screen:
 
 ![](img/guide/cli/android_emulate_install.png)
 
+## Add Features
+
+When you build and view a new project, the default application that
+appears doesn't do very much. You can modify the app in many ways to
+take advantage of standard web technologies, but for the app to
+communicate closely with various device-level features, you need to
+add plugins that provide access to core Cordova APIs.
+
+A _plugin_ is a bit of add-on code that provides an interface to
+native components. You can design your own plugin interface, for
+example when designing a hybrid app that mixes a Cordova WebView with
+native components. (See Embedding WebViews and Plugin Development
+Guide for details.)  More commonly, you would add a plugin to enable
+one of Cordova's basic device-level features
+<!-- XREF
+discussed in the Application Development Guide and
+XREF -->
+detailed in the API Reference.
+
+The `cordova plugin add` command requires you to specify the
+repository for the plugin code.  Here are examples of features you
+might add:
+
+* Basic device information:
+    $ cordova plugin add https://git-wip-us.apache.org/repos/asf/cordova-plugin-device.git
+* Network and battery status:
+    $ cordova plugin add https://git-wip-us.apache.org/repos/asf/cordova-plugin-network-information.git
+    $ cordova plugin add https://git-wip-us.apache.org/repos/asf/cordova-plugin-battery-status.git
+* Accelerometer, compass, and geolocation:
+    $ cordova plugin add https://git-wip-us.apache.org/repos/asf/cordova-plugin-device-motion.git
+    $ cordova plugin add https://git-wip-us.apache.org/repos/asf/cordova-plugin-device-orientation.git
+    $ cordova plugin add https://git-wip-us.apache.org/repos/asf/cordova-plugin-geolocation.git
+* Camera, media capture, and media playback:
+    $ cordova plugin add https://git-wip-us.apache.org/repos/asf/cordova-plugin-camera.git
+    $ cordova plugin add https://git-wip-us.apache.org/repos/asf/cordova-plugin-media-capture.git
+    $ cordova plugin add https://git-wip-us.apache.org/repos/asf/cordova-plugin-media.git    
+* Access files on device or network:
+    $ cordova plugin add https://git-wip-us.apache.org/repos/asf/cordova-plugin-file.git
+    $ cordova plugin add https://git-wip-us.apache.org/repos/asf/cordova-plugin-file-transfer.git
+* Notifications via dialog box or vibration:
+    $ cordova plugin add https://git-wip-us.apache.org/repos/asf/cordova-plugin-dialogs.git
+    $ cordova plugin add https://git-wip-us.apache.org/repos/asf/cordova-plugin-vibration.git
+* Contacts:
+    $ cordova plugin add https://git-wip-us.apache.org/repos/asf/cordova-plugin-contacts.git
+* Globalization:
+    $ cordova plugin add https://git-wip-us.apache.org/repos/asf/cordova-plugin-globalization.git
+* Splash Screen:
+    $ cordova plugin add https://git-wip-us.apache.org/repos/asf/cordova-plugin-splashscreen.git
+* In-app browser:
+    $ cordova plugin add https://git-wip-us.apache.org/repos/asf/cordova-plugin-inappbrowser.git
+* Debug console:
+    $ cordova plugin add https://git-wip-us.apache.org/repos/asf/cordova-plugin-console.git
+
+Use `plugin ls` (or `plugin list`) to view currently installed plugins:
+
+    $ cordova plugin ls    # or 'plugin list'
+    [ 'org.apache.cordova.core.console' ]
+
+To remove a plugin, you refer to it by the same name that appears in
+the listing:
+
+    $ cordova plugin rm org.apache.cordova.core.console        
+    $ cordova plugin remove org.apache.cordova.core.console    # same
+
 <!--
 
 ## Run the App on the Device
 
-## Add a Plug-in
-
-plugin(s) [add|remove|ls [path]] ..... adds or removes a
-         plugin (from the specified path), or lists all
-         currently added plugins
-
 -->
 
 ## Update the App