Updated Branches: refs/heads/master 1ba398c85 -> 8dd23dbbd
Adding BlackBerry 10 Command-line Usage docs Project: http://git-wip-us.apache.org/repos/asf/cordova-docs/repo Commit: http://git-wip-us.apache.org/repos/asf/cordova-docs/commit/8be5de7f Tree: http://git-wip-us.apache.org/repos/asf/cordova-docs/tree/8be5de7f Diff: http://git-wip-us.apache.org/repos/asf/cordova-docs/diff/8be5de7f Branch: refs/heads/master Commit: 8be5de7f82407b5c0ec85c827110e3623e3913b2 Parents: 1ba398c Author: jkeshavarzi <[email protected]> Authored: Mon May 13 18:31:46 2013 -0400 Committer: lorinbeer <[email protected]> Committed: Mon May 13 21:38:40 2013 -0700 ---------------------------------------------------------------------- docs/en/edge/guide/command-line/index.md | 132 +++++++++++++++++++++++- 1 files changed, 126 insertions(+), 6 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/8be5de7f/docs/en/edge/guide/command-line/index.md ---------------------------------------------------------------------- diff --git a/docs/en/edge/guide/command-line/index.md b/docs/en/edge/guide/command-line/index.md index e16a0ac..463ea71 100644 --- a/docs/en/edge/guide/command-line/index.md +++ b/docs/en/edge/guide/command-line/index.md @@ -33,6 +33,7 @@ Cordova projects. * [iOS](#Command-Line%20Usage_ios) * [Android](#Command-Line%20Usage_android) * [BlackBerry](#Command-Line%20Usage_blackberry) +* [BlackBerry 10](#Command-Line%20Usage_blackberry_10) * [Windows Phone 8](#Command-Line%20Usage_wp8) ## Windows Phone @@ -229,7 +230,7 @@ password, location of the BlackBerry WebWorks SDK, and location of BlackBerry simulator executables. $ /path/to/my_new_cordova_project/cordova/build <platform> - + or, on **Windows** $ /path/to/my_new_cordova_project/cordova/build.bat <platform> @@ -243,19 +244,19 @@ password, location of the BlackBerry WebWorks SDK, and location of BlackBerry simulator executables. $ /path/to/my_new_cordova_project/cordova/run <platform> - -and then choose 'no' when prompted with: + +and then choose 'no' when prompted with: Do you have a BlackBerry device connected to your computer? (y/n) - + or, on **Windows** $ /path/to/my_new_cordova_project/cordova/run <platform> -and then choose 'no' when prompted with: +and then choose 'no' when prompted with: Do you have a BlackBerry device connected to your computer? (y/n) - + ### Logging Unfortunately streaming logs directly from the device is not @@ -265,3 +266,122 @@ BlackBerry OS 7.0 and above. Additionally, you can access your application's logs (including any calls to `console.log`) on your device by holding down the ALT key from the home screen and hitting "lglg" keys. + + +##BlackBerry 10 + +Command-line tools are based on shell scripts. If you need help with a command, type the command with the `-h` or `-help` arguments, which are supported by all commands and which will provide descriptions for each of the available arguments. + +The following commands are available: + +##create + +The 'create' command creates a new project: + +``` +bin/create <path-to-project> +``` + +##target + +The `target` command allows you to manage the BlackBerry device(s) or simulator that you will use to test your app. You can add or remove a target, or set a target as the default target. + +###Add a target + +``` +<path-to-project>/cordova/target add <name> <ip-address> <device | simulator> [-p | --password <password>] [--pin <device-pin>] +``` + +where + +- `<name>` specifies a unique name for the target. +- `<ip-address>` specifies the ip address of the BlackBerry device or simulator. +- `-p|--password <password>` specifies the password for the device or simulator. This is required only if the device or simulator is password protected. +- `--pin <device-pin>` specifies the PIN of the BlackBerry device, which identifies that device as a valid host for the debug token. This argument is required only if you are creating a debug token. + +###Remove a target + +``` +<path-to-project>/cordova/target remove <name> +``` + +###Set a target as the default + +``` +<path-to-project>/cordova/target default <name> +``` + +##build + +The `build` command builds the project as a .bar file. You can build your app in either release mode (which produces a signed .bar file) or in debug mode (which produces an unsigned .bar file). + +###Build your project in release mode + +``` +<path-to-project>/cordova/build release -k|--keystorepass <password> [-b|--buildId <number>] [-p|--params <params-JSON-file>] +``` +where + +- `-k|--keystorepass <password>` specifies the password you defined when you configured your computer to sign applications. +- `-b|--buildId <number>` specifies the build version number of your application. Typically, this number should be incremented from the previous signed version. This argument is optional. +- `-p|--params <params-JSON-file>` specifies a JSON file containing additional parameters to pass to downstream tools. This argument is optional. + +###Build your project in debug mode + +``` +<path-to-project>/cordova/build debug [<target>] [-k|--keystorepass <password>] [-p|--params <params-JSON-file>] [-ll|--loglevel <error|warn|verbose>] +``` + +where + +- `<target>` specifies the name of a previously added target. If `<target>` is not specified, the default target is used, if one has been created. This argument is only required if you want the script to deploy your app to a BlackBerry device or simulator and you have not created a default target. Additionally, if `<target>` is a device, then that device must be connected to your computer by USB connection or be connected to the same Wi-Fi network as your computer. +- `-k|--keystorepass <password>` specifies the password you defined when you configured your computer to sign applications. This password is also used to create your debug token. This argument is only required if you want the script to create and install the debug token for you. +- `-p|--params <params-JSON-file>` specifies a JSON file containing additional parameters to pass to downstream tools. +- `-ll|--loglevel <level>` specifies the log level. The log level may be one of `error`, `warn`, or `verbose`. + +If you have previously defined a default target (and previously installed a debug token, if that target is a BlackBerry device), you can run the script with no arguments, and the script will package your app and deploy it to the default target. For example: + +``` +<path-to-project>/cordova/build debug +``` + +##run + +The `run` command deploys the app on the specified BlackBerry device or a simulator. Before deploying your app, you must first create a target for the device or simulator you want to deploy your app to. The deploy script will deploy the most recent build of your app. + +``` +<path-to-project>/cordova/run <target> +``` + +where +- `<target> `specifies the name of a previously added target. If `<target> `is a device, then that device must be connected to your computer by USB connection or be connected to the same Wi-Fi network as your computer. + +##plugin + +The `target` command allows you to add and remove plugins + +###Fetch a locally-hosted plugin + + +``` +<path-to-project>/cordova/plugin fetch <path-to-plugin> +``` + +###View a list of installed plugins + +``` +<path-to-project>/cordova/plugin ls +``` + +###Add a plugin + +``` +<path-to-project>/cordova/plugin add <name> +``` + +###Remove a plugin + +``` +<path-to-project>/cordova/plugin rm <name> +``` +
