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 <stevengil...@gmail.com> Authored: Thu Aug 17 17:18:12 2017 -0700 Committer: Audrey So <audre...@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-unsubscr...@cordova.apache.org For additional commands, e-mail: commits-h...@cordova.apache.org