text 使用npm和yarn更新包

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了text 使用npm和yarn更新包相关的知识,希望对你有一定的参考价值。

Below are a set of commands to list globally installed packages and a set of commands to updated them.

npm
To update npm packages we have npm-check. First you will have to install it globally

npm i npm-check -g
Then to list packages that need to be updated

npm-check -gu
We pass -g flag to do a global search, then u flag to update. This will give us an interactive menu where you can move up/down the list
of packages, then press space bar to select them, finally press Enter key to update the selected packages.

Now to list all of your packages

npm list -g --depth=0
Again we pass the -g flag to do a global search and — depth=0 to give us a clean list. If you don’t then it will give us a very verbose
list, listing all of the dependencies for each package as well.

Yarn
With yarn we don’t have to install another package, just run

yarn global upgrade-interactive
We pass the global flag to do a global search. And as with npm, you can move up/down the list of packages, then press space bar to 
select them, finally press Enter key to update the selected packages.

To list global packages

yarn global list

以上是关于text 使用npm和yarn更新包的主要内容,如果未能解决你的问题,请参考以下文章

如何在 laravel 应用程序中使用 npm 安装包?

无法将 vue 相关的 npm 包包含到我的 Laravel + Vue 项目中

Laravel如何导入通过NPM安装的vuejs包

Laravel 根目录更新,npm run dev 在错误目录中创建 app.css 和 app.js

不使用 npm 将 laravel-echo 和 pusher-js 安装为一个简单的 js 文件

利用npm安装/删除/发布/更新/撤销发布包