简体   繁体   English

如果我使用“ npm install --save-dev”进行NPM安装,如何检查更新

[英]If I do an NPM install with “npm install --save-dev” how can I check for updates

If I install a number of different packages from what I understand using --save-dev will create a local package.json file listing these. 如果我使用--save-dev安装了一些我理解的不同的软件包,则会创建一个本地的package.json文件列出这些文件。

Is there some way using npm (or Webstorm IDE) that I can check these packages to see if any of them have been updated and then download later versions? 是否可以使用npm(或Webstorm IDE)以某种方式检查这些软件包,以查看它们是否已更新,然后下载更高版本?

all --save-dev will do is augment your existing package.json file with a key of --save-dev所要做的就是用以下键扩展现有的package.json文件:

"devDependencies": {

}

This will keep the dependencies at the project level, instead of global requirement, when you npm install. 当您安装npm时,这将使依赖项保持在项目级别,而不是全局要求。

If you want to update your dependency list you can simply use 'npm update', if you want to update a specfic package use 'npm update' with the module name. 如果要更新依赖项列表,则可以简单地使用“ npm update”,如果要更新特定的软件包,请使用“ npm update”作为模块名称。 If you wish to see which packages have an update use 'npm outdated' 如果您想查看哪些软件包有更新,请使用“ npm已过时”

https://www.npmjs.org/doc/cli/npm-update.html https://www.npmjs.org/doc/cli/npm-update.html
https://www.npmjs.org/doc/cli/npm-outdated.html https://www.npmjs.org/doc/cli/npm-outdated.html

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM