cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ste...@apache.org
Subject git commit: CB-5804: added platform tag publishing to plugman
Date Mon, 24 Feb 2014 20:15:43 GMT
Repository: cordova-plugman
Updated Branches:
  refs/heads/master 229837e5f -> a9bf953d5


CB-5804: added platform tag publishing to plugman


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

Branch: refs/heads/master
Commit: a9bf953d5bef9cecf3677998e4048765b85657d9
Parents: 229837e
Author: Steven Gill <stevengill97@gmail.com>
Authored: Mon Feb 24 12:13:28 2014 -0800
Committer: Steven Gill <stevengill97@gmail.com>
Committed: Mon Feb 24 12:15:35 2014 -0800

----------------------------------------------------------------------
 src/registry/manifest.js | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/a9bf953d/src/registry/manifest.js
----------------------------------------------------------------------
diff --git a/src/registry/manifest.js b/src/registry/manifest.js
index 4f59532..c7bbe36 100644
--- a/src/registry/manifest.js
+++ b/src/registry/manifest.js
@@ -38,8 +38,13 @@ function generatePackageJsonFromPluginXml(plugin_path) {
         keywords = pluginElm.findtext('keywords'),
         repo = pluginElm.findtext('repo'),
         issue = pluginElm.findtext('issue'),
-        engines = pluginElm.findall('engines/engine');
+        engines = pluginElm.findall('engines/engine'),
+        platformsElm = pluginElm.findall('platform'),
+        platforms = [];
 
+    platformsElm.forEach(function(plat){
+        platforms.push(plat.attrib.name);
+    })
     if(!version) return Q.reject(new Error('`version` required'));
 
     package_json.version = version;
@@ -57,6 +62,7 @@ function generatePackageJsonFromPluginXml(plugin_path) {
     if(repo)         package_json.repo         = repo;
     if(issue)        package_json.issue        = issue;
     if(keywords)     package_json.keywords     = keywords.split(',');
+    if(platforms)    package_json.platforms    = platforms;
 
     // adding engines
     if(engines) {


Mime
View raw message