cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From audre...@apache.org
Subject [1/2] cordova-common git commit: CB-13145: added variable replacing to framework tag
Date Thu, 28 Sep 2017 16:19:52 GMT
Repository: cordova-common
Updated Branches:
  refs/heads/master 3d4602af9 -> 623039ff6


CB-13145: added variable replacing to framework tag


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

Branch: refs/heads/master
Commit: c38a22093ca60373571b62525d54655a25c26dcf
Parents: 3d4602a
Author: Steve Gill <stevengill97@gmail.com>
Authored: Thu Aug 17 17:18:12 2017 -0700
Committer: Audrey So <audreyso@apache.org>
Committed: Mon Sep 25 10:49:40 2017 -0700

----------------------------------------------------------------------
 src/PluginInfo/PluginInfo.js | 6 ++++++
 1 file changed, 6 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-common/blob/c38a2209/src/PluginInfo/PluginInfo.js
----------------------------------------------------------------------
diff --git a/src/PluginInfo/PluginInfo.js b/src/PluginInfo/PluginInfo.js
index 4d77cbc..ae003c9 100644
--- a/src/PluginInfo/PluginInfo.js
+++ b/src/PluginInfo/PluginInfo.js
@@ -312,6 +312,12 @@ function PluginInfo (dirname) {
             var src = el.attrib.src;
             if (options) {
                 var vars = options.cli_variables || {};
+
+                if (Object.keys(vars).length === 0) {
+                    // get variable defaults from plugin.xml for removal
+                    vars = self.getPreferences(platform);
+                }
+                
                 var regExp;
                 // Iterate over plugin variables.
                 // Replace them in framework src if they exist


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


Mime
View raw message