cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ste...@apache.org
Subject cordova-cli git commit: CB-11412 removed link-to, aliased copy-from to template
Date Tue, 28 Jun 2016 22:14:40 GMT
Repository: cordova-cli
Updated Branches:
  refs/heads/master 486bdab5c -> 64e115222


CB-11412 removed link-to, aliased copy-from to template

 This closes #257


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

Branch: refs/heads/master
Commit: 64e1152227239e44502d0e560ec967a708447f3b
Parents: 486bdab
Author: carynbear <caryn.tran@berkeley.edu>
Authored: Fri Jun 24 14:25:51 2016 -0700
Committer: Steve Gill <stevengill97@gmail.com>
Committed: Mon Jun 27 17:10:50 2016 -0700

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


http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/64e11522/src/cli.js
----------------------------------------------------------------------
diff --git a/src/cli.js b/src/cli.js
index 06b11d4..ef5f1ab 100644
--- a/src/cli.js
+++ b/src/cli.js
@@ -441,7 +441,7 @@ function cli(inputArgs) {
         customWww = args['copy-from'] || args['link-to'] || args.template;
 
         if (customWww) {
-            if (!args.template && 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.'
                 );
@@ -456,10 +456,13 @@ function cli(inputArgs) {
                 template: false
             };
 
-            if (args['link-to'])
-                wwwCfg.link = true;
-            else if (args.template)
+            
+            if (args.template) {
+                wwwCfg.template = true;
+            } else if (args['copy-from']) {
+                logger.warn('Warning: --copy-from option is being deprecated. Consider using
--template instead.');
                 wwwCfg.template = true;
+            }
 
             cfg.lib = cfg.lib || {};
             cfg.lib.www = wwwCfg;


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


Mime
View raw message