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 2016/09/02 19:09:14 UTC

cordova-cli git commit: CB-11607 breakout cordova-create from cordova-lib; CB-11623 added back linking

Repository: cordova-cli
Updated Branches:
  refs/heads/master 4935f1a55 -> ddd828f49


CB-11607 breakout cordova-create from cordova-lib; CB-11623 added back linking

 This closes #259


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

Branch: refs/heads/master
Commit: ddd828f493c8059fd29827d2f54ce680ce904a60
Parents: 4935f1a
Author: carynbear <ca...@berkeley.edu>
Authored: Fri Jul 1 16:50:57 2016 -0700
Committer: Steve Gill <st...@gmail.com>
Committed: Wed Aug 31 15:25:35 2016 -0700

----------------------------------------------------------------------
 spec/cli.spec.js |  2 +-
 src/cli.js       | 13 ++++++++-----
 2 files changed, 9 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/ddd828f4/spec/cli.spec.js
----------------------------------------------------------------------
diff --git a/spec/cli.spec.js b/spec/cli.spec.js
index 6956609..1955009 100644
--- a/spec/cli.spec.js
+++ b/spec/cli.spec.js
@@ -140,7 +140,7 @@ describe("cordova cli", function () {
 
         it("calls cordova raw create", function (done) {
             cli(["node", "cordova", "create", "a", "b", "c", "--link-to", "c:\\personalWWW"], function () {
-                expect(cordova.raw.create).toHaveBeenCalledWith("a", "b", "c", jasmine.any(Object), false);
+                expect(cordova.raw.create).toHaveBeenCalledWith("a", "b", "c", jasmine.any(Object), jasmine.any(Object));
                 done();
             });
         });

http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/ddd828f4/src/cli.js
----------------------------------------------------------------------
diff --git a/src/cli.js b/src/cli.js
index ef5f1ab..d3b6d92 100644
--- a/src/cli.js
+++ b/src/cli.js
@@ -441,9 +441,9 @@ function cli(inputArgs) {
         customWww = args['copy-from'] || args['link-to'] || args.template;
 
         if (customWww) {
-            if ((!args.template || !args['copy-from']) && customWww.indexOf('http') === 0) {
+            if (!args.template && !args['copy-from'] && customWww.indexOf('http') === 0) {
                 throw new CordovaError(
-                    'Only local paths for custom www assets are supported.'
+                    'Only local paths for custom www assets are supported for linking' + customWww
                 );
             }
 
@@ -453,10 +453,13 @@ function cli(inputArgs) {
 
             wwwCfg = {
                 url: customWww,
-                template: false
+                template: false,
+                link: false
             };
 
-            
+            if (args['link-to']) {
+                wwwCfg.link = true;
+            }
             if (args.template) {
                 wwwCfg.template = true;
             } else if (args['copy-from']) {
@@ -471,7 +474,7 @@ function cli(inputArgs) {
             , undashed[2]  // App id
             , undashed[3]  // App name
             , cfg
-            , args['fetch'] != undefined
+            , events || undefined
         );
     }
 }


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