Ionic 2:如何更新现有项目的 Ionic 库? [英] Ionic 2: How to update Ionic library for an existing project?

查看:20
本文介绍了Ionic 2:如何更新现有项目的 Ionic 库?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在 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 的引用是 here 这是当您开始一个新项目时下载的.

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 库?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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