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 2017/10/06 22:30:28 UTC

[08/12] cordova-common git commit: CB-13145: added variable replacing to framework tag

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/2.1.x
Commit: c38a22093ca60373571b62525d54655a25c26dcf
Parents: 3d4602a
Author: Steve Gill <st...@gmail.com>
Authored: Thu Aug 17 17:18:12 2017 -0700
Committer: Audrey So <au...@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