背景
更新项目里的依赖项,传统的做法是一个一个更新,这种方式比较耗时,可以使用npm-check
来更好的管理更新依赖项
安装npm-check
使用npm-check
在项目根目录运行
可以看到输出:
1 2 3 4 5 6 7 8 9 10 11 12 13
| Patch Update Backwards-compatible bug fixes. >( ) autoprefixer devDep 9.6.4 ❯ 9.6.5 https://github.com/postcss/autoprefixer ( ) portfinder devDep 1.0.24 ❯ 1.0.25 https://github.com/indexzero/node-portfinder
Minor Update New backwards-compatible features. ( ) script-ext-html-webpack-plugin devDep 2.0.1 ❯ 2.1.4 https://github.com/numical/script-ext-html-webpack-plugin ( ) webpack devDep 4.16.5 ❯ 4.41.2 https://github.com/webpack/webpack ( ) webpack-cli devDep 3.1.0 ❯ 3.3.9 https://github.com/webpack/webpack-cli ( ) webpack-dev-server devDep 3.1.14 ❯ 3.8.2 https://github.com/webpack/webpack-dev-server ( ) webpack-merge devDep 4.1.4 ❯ 4.2.2 https://github.com/survivejs/webpack-merge
Major Update Potentially breaking API changes. Use caution. (Move up and down to reveal more choices)
|
通过空格选择需要更新的依赖项,Ctrl+c
取消,回车执行更新
参考