问题描述
例如,我可以运行
cordova插件add cordova-plugin-whitelist
或
phonegap插件add cordova-plugin-whitelist
修改 config.xml
文件
config.xml:
< plugin name =cordova-plugin-whitelistspec =1.1.0/&
或
gap:plugin name =cordova-plugin-whitelistspec =1.1.0/>
所有这些不同的插件安装有什么区别?我应该在最后使用哪一个?
我想在所有其他开发人员的计算机上提供相同的插件,在完全相同的版本有一个稳定和可重复环境(并且CLI似乎没有指定版本...)。我应该将任何 / plugins
文件夹包含到Git吗?
注意:知道哪个cordova或phonegap CLI我将来使用,因为我不知道,如果我将使用Phonegap Build。目前CLI(v5.1.1)似乎工作正常。
使用:
cordova插件add cordova-plugin-whitelist --save
There's something I find quite confusing about phonegap/cordova plugins.
For example I can run
cordova plugin add cordova-plugin-whitelist
OR
phonegap plugin add cordova-plugin-whitelist
Doing so does not modify the config.xml
file
Or I can add to config.xml:
<plugin name="cordova-plugin-whitelist" spec="1.1.0" />
OR
<gap:plugin name="cordova-plugin-whitelist" spec="1.1.0" />
What are exactly the differences between all these different plugin installations? Which one should I use in the end?
I want the same plugins to be available on all the other developers computers, in the exact same version to have a stable and reproductible environment (and the CLI does not seem to specify the version...). Should I include anything of my /plugins
folder to Git?
Note: if it matters, I don't know yet which of cordova or phonegap CLI I'll use in the future, as I don't know yet if I'll use Phonegap Build. For the moment both CLI (v5.1.1) seems to work fine.
Use:
cordova plugin add cordova-plugin-whitelist --save
这篇关于cordova / phonegap插件添加VS config.xml的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!