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

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

问题描述

在Ionic 2网站上找不到任何信息。例如,使用Ionic库2.0.1创建项目。如何将其更新到Ionic library 2.1.0?什么是标准程序? 离子库更新已弃用。

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

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