You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by bh...@apache.org on 2013/05/21 17:15:22 UTC
webworks commit: [CB-3161] Improvements to target command help
Updated Branches:
refs/heads/master d8c649b3d -> dd7c4674b
[CB-3161] Improvements to target command help
- Updated both run and target command help
- Target type is now device by default
Reviewed by Jeffrey Heifetz <jh...@blackberry.com>
Tested by Tracy Li <tl...@blackberry.com>
Project: http://git-wip-us.apache.org/repos/asf/cordova-blackberry/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-blackberry/commit/dd7c4674
Tree: http://git-wip-us.apache.org/repos/asf/cordova-blackberry/tree/dd7c4674
Diff: http://git-wip-us.apache.org/repos/asf/cordova-blackberry/diff/dd7c4674
Branch: refs/heads/master
Commit: dd7c4674beb7a954fd52e6f962d0e2a4b991055e
Parents: d8c649b
Author: DanielAudino <da...@blackberry.com>
Authored: Wed Apr 24 15:11:57 2013 -0400
Committer: Bryan Higgins <bh...@blackberry.com>
Committed: Tue May 21 11:17:23 2013 -0400
----------------------------------------------------------------------
blackberry10/bin/templates/project/cordova/lib/run | 4 ++--
.../bin/templates/project/cordova/lib/target | 7 ++++---
2 files changed, 6 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/dd7c4674/blackberry10/bin/templates/project/cordova/lib/run
----------------------------------------------------------------------
diff --git a/blackberry10/bin/templates/project/cordova/lib/run b/blackberry10/bin/templates/project/cordova/lib/run
index 9f47e10..d6b4b9c 100755
--- a/blackberry10/bin/templates/project/cordova/lib/run
+++ b/blackberry10/bin/templates/project/cordova/lib/run
@@ -96,11 +96,11 @@ function execNativeDeploy(optionsArray, callback) {
function checkTarget() {
if (!target) {
- console.log("No target exists, to add that target please run target add <name> <ip> <type> [-p <password>] [--pin <devicepin>]\n");
+ console.log("No target exists, to add that target please run target add <name> <ip> [-t | --type <device | simulator>] [-p <password>] [--pin <devicepin>]\n");
return false;
}
if (!properties.targets[target]) {
- console.log("The target \""+target+"\" does not exist, to add that target please run target add "+target+" <ip> <type> [-p <password>] [--pin <devicepin>]\n");
+ console.log("The target \""+target+"\" does not exist, to add that target please run target add "+target+" <ip> [-t | --type <device | simulator>] [-p <password>] [--pin <devicepin>]\n");
return false;
}
if (properties.targets[target].ip) {
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/dd7c4674/blackberry10/bin/templates/project/cordova/lib/target
----------------------------------------------------------------------
diff --git a/blackberry10/bin/templates/project/cordova/lib/target b/blackberry10/bin/templates/project/cordova/lib/target
index 61211d3..f50ac60 100644
--- a/blackberry10/bin/templates/project/cordova/lib/target
+++ b/blackberry10/bin/templates/project/cordova/lib/target
@@ -79,13 +79,14 @@ function isValidPin(pin) {
commander
.usage('[command] [params]')
.option('-p, --password <password>', 'Specifies password for this target')
- .option('--pin <devicepin>', 'Specifies PIN for this device');
+ .option('--pin <devicepin>', 'Specifies PIN for this device')
+ .option('-t, --type <device | simulator>', 'Specifies the target type');
commander
.on('--help', function () {
console.log(' Synopsis:');
console.log(' $ target');
- console.log(' $ target add <name> <ip> <type> [-p | --password <password>] [--pin <devicepin>]');
+ console.log(' $ target add <name> <ip> [-t | --type <device | simulator>] [-p | --password <password>] [--pin <devicepin>]');
console.log(' $ target remove <name>');
console.log(' $ target default [name]');
console.log(' ');
@@ -100,7 +101,7 @@ commander
}
name = commander.args[0];
ip = commander.args[1];
- type = commander.args[2];
+ type = commander.type ? commander.type : "device";
if (commander.password && typeof commander.password === 'string') {
password = commander.password;
}