[
https://issues.apache.org/jira/browse/CB-8596?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14379291#comment-14379291
]
ASF GitHub Bot commented on CB-8596:
------------------------------------
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 <[email protected]>
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().
----
> cordova-lib API for retrieval of platforms and plugins from config.xml
> -----------------------------------------------------------------------
>
> Key: CB-8596
> URL: https://issues.apache.org/jira/browse/CB-8596
> Project: Apache Cordova
> Issue Type: New Feature
> Reporter: Omar Mefire
> Assignee: Omar Mefire
>
> IDE's and other apps using cordova's APIs need a way to access project's
> metadata (platforms and plugins within config.xml) without going directly
> through the ConfigParser. They should be abstracted away from the storage
> details.
> This modification is made even more important with the upcoming move to npm
> that is going to necessitate moving platforms and plugins infos to
> package.json.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]