当您在角项目上运行ng update时,它会根据需要自动更改代码基。如何对TypeScript角库进行同样的操作?
如果我在我的库上运行ng update,它只会抛出以下内容,并且不会升级任何代码:
√ Packages successfully installed.
Using package manager: npm
Collecting installed dependencies...
Found 54 dependencies.
We analyzed your package.json, there are some packages to update:
N
我以前使用过ng update --all,因为我想将每个包更新到最新版本,包括那些没有附加图表的依赖项。
现在不再推荐--all选项,它将不再起作用。唯一的选择是指定要更新的每个包,我觉得这很乏味。是否有一种方法可以将ng update过时的包输出到一个分隔的单行空间变量中,然后输入到一个新的ng update ${packageList}
ng update的输出如下:
The installed local Angular CLI version is older than the latest stable version.
Installing a temporary version
当我启动ng update时,它显示@angular/core的两个条目。当我解雇ng update @angular/core的时候,它就变成了8表6 Collecting installed dependencies...
Found 99 dependencies.
Two or more projects are using identical roots. Unable to determine project using current working directory. Using default workspace project instead.
We analy
问题..。我在一个运行角5.x.x的系统上,需要将它升级到6.x.x。我发现这个帖子:
会不会运行下面的命令升级到最新的版本而不是6?
ng update @angular/cli
ng update @angular/core
ng update @angular/material
ng update rxjs
所以,在我的场景中,我不需要为它们指定版本吗?
而且,如果我这样做了,我如何知道我需要使用哪种版本的rxjs与最新的6.x.x版本一起工作?
无论6的最新版本是什么,这会不会是我的通话格式?
ng update @angular/cli@^6.0.0
ng update @angul
以下是ng update命令的结果:
我们分析了您的package.json,有一些包需要更新:
Name Version Command to update
--------------------------------------------------------------------------------
@angular/cli 7.3.10 -> 10.0.5 ng update @angular/cli
如果我运行该命令 ng update
I see a listing of items such as
@angular/cdk 6.4.7 > 8.2.0 ng update @angular/cdk
...
... 可能还有其他已过期的包。 或者运行ng update --all来尝试同时更新所有内容。 命令ng update本身似乎没有做任何更改。 因此,执行 做些改变? 我只想看到所有的包都被检测到需要更新。