[
https://issues.apache.org/jira/browse/CB-7278?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14091185#comment-14091185
]
ASF GitHub Bot commented on CB-7278:
------------------------------------
Github user joseph-onsip commented on the pull request:
https://github.com/apache/cordova-lib/pull/71#issuecomment-51646216
Sure, I work on a [project](https://github.com/onsip/SIP.js) that [requires
its
package.json](https://github.com/onsip/SIP.js/blob/817c7038c0be0d66a68d4c1f5d5e99678017186b/src/SIP.js#L10-L19).
In order to make the project usable as a Cordova plugin, I had to copy the
relevant portions of package.json into a separate file,
[cordova_package.json.js](https://github.com/onsip/SIP.js/commit/0862df7c825b27f90a5665f584334b232eddf644#diff-0),
then [specify *that* file as the src of the "package.json"
module](https://github.com/onsip/SIP.js/commit/0862df7c825b27f90a5665f584334b232eddf644#diff-53f390d375398624afe1cfe1125f42bfR7).
If plugin modules could be .json files, I could just specify package.json
as the src of the module, instead of needing to manually synchronize
cordova_package.json.js with package.json.
I opened [CB-7278](https://issues.apache.org/jira/browse/CB-7278) on JIRA,
as well.
> Allow plugin modules to be .json files
> --------------------------------------
>
> Key: CB-7278
> URL: https://issues.apache.org/jira/browse/CB-7278
> Project: Apache Cordova
> Issue Type: Improvement
> Components: CordovaLib
> Affects Versions: 3.5.0
> Reporter: Joseph Frazier
> Priority: Trivial
> Labels: json, module, plugin, require
> Original Estimate: 0h
> Remaining Estimate: 0h
>
> [Node.js modules can be .json
> files|https://github.com/joyent/node/commit/588d885e81dec667920383ac7246daceeb7f99fd],
> in which case module.exports is simply the parsed object. Cordova modules
> should also have this ability, so that modular plugins don't have to be
> bundled before Cordova prepares them.
> I've submitted a pull request for this on github:
> https://github.com/apache/cordova-lib/pull/71
--
This message was sent by Atlassian JIRA
(v6.2#6252)