docs: function generatePackageJsonFromPluginXml(plugin_path) {
      return Q().then(function() {
          var package_json = {};
          var pluginInfo = new PluginInfo(plugin_path);
  
          // REQUIRED: name, version
          // OPTIONAL: description, license, keywords, engine
          var name = pluginInfo.id,
              version = pluginInfo.version,
              cordova_name = pluginInfo.name,
              description = pluginInfo.description,
              license = pluginInfo.license,
              keywords = pluginInfo.keywords,
              repo = pluginInfo.repo,
              issue = pluginInfo.issue,
              engines = pluginInfo.getEngines(),
              platforms = pluginInfo.getPlatforms(),
              englishdoc = '';
  
          if(!version) throw new Error('`version` required');
  
          package_json.version = version;
  
          if(!name) throw new Error('`id` is required');
  
          validateName(name);
  
          package_json.name = name.toLowerCase();
  
          if(cordova_name) package_json.cordova_name = cordova_name;
          if(description)  package_json.description  = description;
          if(license)      package_json.license      = license;
          if(repo)         package_json.repo         = repo;
          if(issue)        package_json.issue        = issue;
          if(keywords)     package_json.keywords     = keywords;
          if(platforms) {
              package_json.platforms = platforms.map(function(p) {
                  return p.name;
              });
          }
  
          // Adding engines
          if(engines) {
              package_json.engines = engines.map(function(e) {
                  return {name: e.name, version: e.version};
              });
          }
  
          // Set docs_path to doc/index.md exists
          var docs_path = path.resolve(plugin_path, 'doc/index.md');
          if(!(fs.existsSync(docs_path))){
              // Set docs_path to doc/en/index.md
              docs_path = path.resolve(plugin_path, 'doc/en/index.md');
          }
          if(fs.existsSync(docs_path)){
              englishdoc = fs.readFileSync(docs_path, 'utf-8');
              package_json.englishdoc = englishdoc;
          }
  
          // Write package.json
          var package_json_path = path.resolve(plugin_path, 'package.json');
          fs.writeFileSync(package_json_path, JSON.stringify(package_json, null, 4), 'utf8');
          return package_json;
      });
  }