You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by fi...@apache.org on 2017/06/22 17:34:34 UTC
[03/14] cordova-lib git commit: deprecate anything related to
plugin_parser class.
deprecate anything related to plugin_parser class.
Project: http://git-wip-us.apache.org/repos/asf/cordova-lib/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-lib/commit/cc90653d
Tree: http://git-wip-us.apache.org/repos/asf/cordova-lib/tree/cc90653d
Diff: http://git-wip-us.apache.org/repos/asf/cordova-lib/diff/cc90653d
Branch: refs/heads/master
Commit: cc90653d00374713484aea97663283b0d0b9be88
Parents: ce93923
Author: filmaj <ma...@gmail.com>
Authored: Mon Jun 19 23:02:29 2017 -0500
Committer: filmaj <ma...@gmail.com>
Committed: Wed Jun 21 14:57:48 2017 -0500
----------------------------------------------------------------------
src/cordova/plugin_parser.js | 6 ++++--
src/cordova/util.js | 1 +
2 files changed, 5 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/cc90653d/src/cordova/plugin_parser.js
----------------------------------------------------------------------
diff --git a/src/cordova/plugin_parser.js b/src/cordova/plugin_parser.js
index 4147942..d251557 100644
--- a/src/cordova/plugin_parser.js
+++ b/src/cordova/plugin_parser.js
@@ -18,12 +18,14 @@
*/
var xml = require('cordova-common').xmlHelpers;
+var events = require('cordova-common').events;
/** Deprecated. Use PluginInfo instead. */
-function plugin_parser(xmlPath) {
+function plugin_parser (xmlPath) {
+ events.emit('warn', 'WARNING: Cordova\'s plugin_parser class is now deprecated and will be removed in a future version. Please transition to using the PluginInfo class instead.');
this.path = xmlPath;
this.doc = xml.parseElementtreeSync(xmlPath);
- this.platforms = this.doc.findall('platform').map(function(p) {
+ this.platforms = this.doc.findall('platform').map(function (p) {
return p.attrib.name;
});
}
http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/cc90653d/src/cordova/util.js
----------------------------------------------------------------------
diff --git a/src/cordova/util.js b/src/cordova/util.js
index 294dfa5..c9407dc 100644
--- a/src/cordova/util.js
+++ b/src/cordova/util.js
@@ -56,6 +56,7 @@ Object.defineProperty(exports,'libDirectory', {
}
});
+// TODO: this is no longer used. we should deprecate and remove.
exports.plugin_parser = require('./plugin_parser');
exports.raw = {};
// Alias the plugin_parser method to the raw:{} object above.
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org