问题描述
在 Ionic 2 网站上找不到任何信息.例如,一个项目是用 Ionic 库 2.0.1 创建的.如何将其更新到 Ionic 库 2.1.0?标准程序是什么?ionic lib update
已弃用.
Can't find any info on Ionic 2 website. For example, a project is created with Ionic library 2.0.1. How do I update it to Ionic library 2.1.0? What is the standard procedure? ionic lib update
is deprecated.
推荐答案
如果你想更新你的 CLI,你需要运行:
If you want to update your CLI, you need to run:
npm install -g ionic@latest
要更新您的项目,请打开您的 package.json 并更新 ionic-angular
条目和任何其他需要更新的依赖项的版本.对 package.json 的引用是这里一个在你开始一个新项目时下载的.
For updating your project, open your package.json and update the version of ionic-angular
entry and any other dependencies that need to be updated. Reference to a package.json is here which is the one that is downloaded when you start a new project.
然后删除您的项目 node_modules
并运行:
Then delete your projects node_modules
and run:
npm install
在你的项目目录中.
这篇关于Ionic 2:如何为现有项目更新 Ionic 库?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!