将已经安装的Cordova插件保存到config.xml [英] Save already installed Cordova plugins to config.xml

查看:385
本文介绍了将已经安装的Cordova插件保存到config.xml的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经使用以下语法安装了所有的cordova插件:

I have installed all my cordova plugins using the following syntax:

cordova plugin add <plugin-name>

我知道(现在),如果您将--save标志添加到安装命令,它将把您的插件添加到config.xml

I know (now) that if you add the --save flag to your install command, it will add your plugins to config.xml

cordova plugin add <plugin-name> --save

但是,有一种偷懒的方法可以自动将我已经安装的插件添加到config.xml中,如下所示:

But, is there a lazy way to automatically add my already installed plugins to config.xml with something like this:

cordova plugin save-installed

如果我在这里缺少明显的东西,请不要害羞地指出正确的方向.

If I am missing something obvious here, don't be shy to point me in the right direction.

推荐答案

科尔多瓦5的此科尔多瓦发布帖子,您可以使用一个命令将已安装的插件添加到config.xml:

As reported in this cordova release post from cordova 5 you can add already installed plugins to config.xml using just one command:

cordova plugin save

这会将以前安装的所有插件保存到您项目的config.xml中.

This will save all previously installed plugins into your project’s config.xml.

您可以检查最新的cordova plugin文档以获得更多详细信息.

You can check the latest cordova plugin documentation for more details.

如果您需要对已安装的平台执行相同的操作,只需运行 cordova platform save .

If you need to do the same with the installed platforms, just run cordova platform save.

这篇关于将已经安装的Cordova插件保存到config.xml的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆