简体   繁体   English

检索cordova插件信息

[英]Retrieving cordova plugin information

I'm creating a(n) cordova customer plugin. 我正在创建一个(n)cordova客户插件。 Now I'm in the process of automating things so my question is after every successful install of a(n) plugin is there a way to instruct cordova to retrieve the plugin id and the clobbers target and put it in a JSON object or something? 现在我正在使事情自动化,所以我的问题是在成功安装a(n)插件之后,有没有一种方法可以指示cordova检索插件ID和Clobbers目标并将其放入JSON对象或其他对象中?

Thank you. 谢谢。

You already have a json file for each platform in the /plugins folder. 在/ plugins文件夹中,每个平台都已经有一个json文件。

If you need to generate an other file after a plugin is added, you can create a cordova hook in /hooks/after_plugin_add. 如果您需要在添加插件后生成其他文件,则可以在/ hooks / after_plugin_add中创建cordova挂钩。

check those links about hooks: http://www.mooreds.com/wordpress/archives/1197 https://github.com/apache/cordova-cli/blob/master/templates/hooks-README.md http://devgirl.org/2013/11/12/three-hooks-your-cordovaphonegap-project-needs/ 检查有关钩子的那些链接: http: //www.mooreds.com/wordpress/archives/1197 https://github.com/apache/cordova-cli/blob/master/templates/hooks-README.md http:// devgirl.org/2013/11/12/three-hooks-your-cordovaphonegap-project-needs/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM