如何从ionic 2/3或ionic V2 +项目中删除已安装的ionic cordova插件 [英] How to remove installed ionic cordova plugin from ionic 2 / 3 or ionic V2+ project
问题描述
我在ionic3项目中安装了Cordova和Ionic Native插件.
I installed Cordova and Ionic Native plugins into the ionic3 project.
但是我只需要从项目中完全删除特定的Cordova和Ionic Native插件即可. (具有类似npm
的依赖项.)
But I need to remove only that specific Cordova and Ionic Native plugins from the project completely. (With its dependencies like npm
).
有什么适当的方法可以做到吗?
Is there any proper way to do that?
感谢您的任何帮助.
谢谢!
推荐答案
我只是参考他们的文档这里.
I just refer their document here.
示例:
要安装我们正在使用的插件
ionic cordova plugin add <plugin-name>
ionic cordova plugin add <plugin-name>
(ionic cordova plugin add cordova-plugin-dialogs
)
npm install --save @ionic-native/<npm-name-of-plugin>
npm install --save @ionic-native/<npm-name-of-plugin>
(npm install --save @ionic-native/dialogs
)
要卸载,该插件只需还原以下内容即可
To Uninstall the plugin just need to revert above things back as bellow
ionic cordova plugin remove <plugin-name>
或ionic cordova plugin rm <plugin-name>
(ionic cordova plugin remove cordova-plugin-dialogs
)或(ionic cordova plugin rm cordova-plugin-dialogs
)
最后从npm卸载关联的Ionic Native软件包
Finally uninstall the associated Ionic Native package(s) from npm
npm uninstall --save @ionic-native/<npm-name-of-plugin>
npm uninstall --save @ionic-native/<npm-name-of-plugin>
(npm uninstall --save @ionic-native/dialogs
)
--save标志将删除该插件的项目的package.json条目
The --save flag will remove the project's package.json entry for that plugin
做上述事情有助于我从项目中完全删除具有npm依赖关系的插件.希望这对其他人有用
Doing above things helps me to remove plugin completely with its npm dependencies from the project. Hope this will useful to someone else
这篇关于如何从ionic 2/3或ionic V2 +项目中删除已安装的ionic cordova插件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!