GitHub user TimBarham opened a pull request: https://github.com/apache/cordova-lib/pull/191
CB-8596 Expose APIs to retrieve platforms and plugins from config.xml Provides third parties access to platform and plugin information stored in `config.xml` without having to go through ConfigParser. Based on work by @omefire, with the following changes: * Tests simplified to use predefined `config.xml`. * Updated to use `plugin` calls instead of `feature` calls (which have been removed). * Updates plugin metadata to return `variables` property as an array. * Maps platform `version` to `src` if it doesn't look like a version (to handle the fact that platform stores either version or source in the `version` property). * Removed `getProjectMetadata` method and renamed `getProjectMetadata` property to `projectMetadata`. So api is now simply `cordova.projectMetadata.getPlatforms()` and `cordova.projectMetadata.getPlugins()`. You can merge this pull request into a Git repository by running: $ git pull https://github.com/MSOpenTech/cordova-lib CB-8596-tbarham Alternatively you can review and apply these changes as the patch at: https://github.com/apache/cordova-lib/pull/191.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #191 ---- commit 6a42ffd36320da7bea7e3ee1b29e7c4187869a1c Author: Tim Barham <tim.bar...@microsoft.com> Date: 2015-03-24T01:04:03Z CB-8596 Expose APIs to retrieve platforms and plugins saved in config.xml. Provides third parties access to platform and plugin information stored in config.xml without having to go through ConfigParser. Based on work by @omefire, with the following changes: * Tests simplified to use predefined config.xml. * Updated to use "plugin" calls instead of "feature" calls. * Updates plugin metadata to return variables as an array. * Maps platform 'version' to 'src' if it doesn't look like a version (to handle the fact that platform stores either version or source in the 'version' property). * Removed getProjectMetadata method and renamed getProjectMetadata property of cordova to projectMetadata. So api is now simply cordova.projectMetadata.getPlatforms() and cordova.projectMetadata.getPlugins(). ---- --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@cordova.apache.org For additional commands, e-mail: dev-h...@cordova.apache.org