You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by an...@apache.org on 2013/07/30 21:17:33 UTC

git commit: adding cordova name

Updated Branches:
  refs/heads/master 5660e6045 -> 13b623296


adding cordova name


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

Branch: refs/heads/master
Commit: 13b623296862682be7eeb74d6e7eac079d3046ed
Parents: 5660e60
Author: Anis Kadri <an...@apache.org>
Authored: Tue Jul 30 12:17:32 2013 -0700
Committer: Anis Kadri <an...@apache.org>
Committed: Tue Jul 30 12:17:32 2013 -0700

----------------------------------------------------------------------
 src/registry/manifest.js | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/13b62329/src/registry/manifest.js
----------------------------------------------------------------------
diff --git a/src/registry/manifest.js b/src/registry/manifest.js
index 129a828..0aa70e3 100644
--- a/src/registry/manifest.js
+++ b/src/registry/manifest.js
@@ -24,6 +24,7 @@ function generatePackageJsonFromPluginXml(plugin_path, cb) {
   // OPTIONAL: description, license, keywords
   var name = pluginElm.attrib.id,
       version = pluginElm.attrib.version,
+      cordova_name = pluginElm.findtext('name'),
       description = pluginElm.findtext('description'),
       license = pluginElm.findtext('license'),
       keywords = pluginElm.findtext('keywords');
@@ -38,9 +39,10 @@ function generatePackageJsonFromPluginXml(plugin_path, cb) {
   }
   package_json.name = name.toLowerCase();
 
-  if(description) package_json.description = description;
-  if(license)     package_json.license     = license  
-  if(keywords)    package_json.keywords    = keywords.split(',');
+  if(cordova_name) package_json.cordova_name = cordova_name;
+  if(description)  package_json.description  = description;
+  if(license)      package_json.license      = license;
+  if(keywords)     package_json.keywords     = keywords.split(',');
 
   // write package.json
   var package_json_path = path.resolve(plugin_path, 'package.json');