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 2015/01/04 03:01:20 UTC

[1/2] cordova-cli git commit: CB-8168 --list support for CLI

Repository: cordova-cli
Updated Branches:
  refs/heads/master e4210af2b -> baef5587b


CB-8168 --list support for CLI


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

Branch: refs/heads/master
Commit: eceb2b62435dc5cf678dac6e17bffc2d9cdb954b
Parents: e4210af
Author: Murat Sutunc <mu...@microsoft.com>
Authored: Fri Dec 26 10:44:27 2014 -0800
Committer: Murat Sutunc <mu...@microsoft.com>
Committed: Fri Dec 26 10:44:27 2014 -0800

----------------------------------------------------------------------
 doc/run.txt | 1 +
 src/cli.js  | 3 ++-
 2 files changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/eceb2b62/doc/run.txt
----------------------------------------------------------------------
diff --git a/doc/run.txt b/doc/run.txt
index 8f48db0..185f6fb 100644
--- a/doc/run.txt
+++ b/doc/run.txt
@@ -31,3 +31,4 @@ Experimental Flags
 
     --browserify ....................... Plugins javascript gets loaded at build time instead of runtime using browserify.
                                          Replaces cordovajs file with one that includes the JS of the installed plugins.
+    --list ............................. Prints out available targets for Cordova. Will display both device and emulator unless TARGET option is provided. 
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/eceb2b62/src/cli.js
----------------------------------------------------------------------
diff --git a/src/cli.js b/src/cli.js
index b5ff511..4470136 100644
--- a/src/cli.js
+++ b/src/cli.js
@@ -82,6 +82,7 @@ function cli(inputArgs) {
         , 'target' : String
         , 'browserify': Boolean
         , 'nobuild': Boolean
+        , 'list': Boolean
         };
 
     var shortHands =
@@ -207,7 +208,7 @@ function cli(inputArgs) {
         // calling into platform code should be dealing with this based
         // on the parsed args object.
         var downstreamArgs = [];
-        var argNames = [ 'debug', 'release', 'device', 'emulator', 'nobuild'];
+        var argNames = [ 'debug', 'release', 'device', 'emulator', 'nobuild', 'list'];
         argNames.forEach(function(flag) {
             if (args[flag]) {
                 downstreamArgs.push('--' + flag);


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org


[2/2] cordova-cli git commit: Fixed jshint issues with cli.js (close #199)

Posted by ag...@apache.org.
Fixed jshint issues with cli.js (close #199)


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

Branch: refs/heads/master
Commit: baef5587b8666828a2c50659f7ba81595afbb0dd
Parents: eceb2b6
Author: Murat Sutunc <mu...@microsoft.com>
Authored: Fri Dec 26 10:46:17 2014 -0800
Committer: Andrew Grieve <ag...@chromium.org>
Committed: Sat Jan 3 21:01:04 2015 -0500

----------------------------------------------------------------------
 src/cli.js | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/baef5587/src/cli.js
----------------------------------------------------------------------
diff --git a/src/cli.js b/src/cli.js
index 4470136..bb73bfd 100644
--- a/src/cli.js
+++ b/src/cli.js
@@ -32,7 +32,6 @@ var path = require('path'),
 var cordova_lib = require('cordova-lib'),
     CordovaError = cordova_lib.CordovaError,
     cordova = cordova_lib.cordova,
-    plugman = cordova_lib.plugman,
     events = cordova_lib.events;
 
 
@@ -54,9 +53,9 @@ function init() {
         );
         process.exit(2);
     }
-};
+}
 
-module.exports = cli
+module.exports = cli;
 function cli(inputArgs) {
     // When changing command line arguments, update doc/help.txt accordingly.
     var knownOpts =
@@ -93,13 +92,13 @@ function cli(inputArgs) {
         };
 
     // If no inputArgs given, use process.argv.
-    inputArgs = inputArgs || process.argv
+    inputArgs = inputArgs || process.argv;
 
     init();
 
 
 
-    var args = nopt(knownOpts, shortHands, inputArgs)
+    var args = nopt(knownOpts, shortHands, inputArgs);
 
 
     if (args.version) {
@@ -224,7 +223,7 @@ function cli(inputArgs) {
 
         cordova.raw[cmd].call(null, opts).done();
     } else if (cmd == 'serve') {
-        var port = undashed[1]
+        var port = undashed[1];
         cordova.raw.serve(port).done();
     } else if (cmd == 'create') {
         var cfg = {};


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org