我可以使用cordova plugin add命令安装以前版本的插件吗? [英] Can I install a previous version of a plugin using the cordova plugin add command?

查看:195
本文介绍了我可以使用cordova plugin add命令安装以前版本的插件吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试从头开始重建cordova项目,并一路创建文档.我希望能够安装一致版本的插件,以免暂时不必重新测试新代码.有没有一种方法可以指定一个插件的早期版本,就像您可以指定一个科尔多瓦的早期版本一样?例如,我熟悉以下语法来安装特定版本的cordova:

I am trying to rebuild a cordova project from scratch and creating documentation along the way. I would like to be able to install consistent versions of plugins to avoid having to retest new code for the time being. Is there a way to specify a previous version of a plugin similar to the way you can specify a previous version of cordova? For example, I am familiar with the following syntax to install a specific version of cordova:

npm install -g cordova@3.1

我可以使用以下语法安装插件:

And I'm able to install a plugin with the following syntax:

cordova plugin add org.apache.cordova.device

我希望能够做到以下内容:

I would like to be able to so something like the following:

cordova plugin add org.apache.cordova.device@2.1

任何包含不可能"的见解都会有所帮助.谢谢!

Any insight including "not possible" would be helpful. Thanks!

推荐答案

来自科尔多瓦官方网站

http://cordova.apache.org/news/2013/10/21/cordova-registry.html

在应用程序目录中的任何位置,都可以使用

From anywhere within an app’s directory, plugins can be added to a project with

cordova plugin add [PLUGIN_ID]

其中PLUGIN_ID是插件注册表网站上显示的ID(通常是反向域样式).您还可以下载特定版本的插件:

where PLUGIN_ID is the id (typically reverse-domain style) shown on the plugin registry website. You can also download a specific version of a plugin:

cordova plugin add [PLUGIN_ID]@[VERSION]

这篇关于我可以使用cordova plugin add命令安装以前版本的插件吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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