在 Cordova 中,可以将平台和插件保存到 config.xml
文件中,这样:
cordova platform add <platform> --save
cordova plugin add <plugin> --save
这对于版本控制很有用,以便不提交所有这些生成的文件。
但是...如何从 config.xml
安装它们?
类似于:cordova platform add --source=config.xml
?
最佳答案
更新:有关此主题的官方文档:http://cordova.apache.org/docs/en/latest/platform_plugin_versioning_ref/index.html
这是来自 Tools Release: April 21, 2015 的关于此功能的一些文档:
When adding plugins or platforms, use the --save flag to add them to config.xml.
Ex: cordova platform add android --save.
Existing projects can use cordova plugin save and cordova platform save commands to save all previously installed plugins and platforms into your project's config.xml.
Platforms and plugins will be autorestored when cordova prepare is run. This allows developers to easily manage and share their dependenceis among different development enviroments and with their coworkers.
关于git - Cordova 从 config.xml 安装平台/插件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33097083/