Node.js/npm/依赖检查:修订间差异
来自康健生活
| 第10行: | 第10行: | ||
{{shc|<syntaxhighlight lang="bash"> | {{shc|<syntaxhighlight lang="bash"> | ||
npm outdated</syntaxhighlight>|$|/home/ | npm outdated</syntaxhighlight>|$|/home/kwy}} | ||
{{shc|<syntaxhighlight lang="bash"> | {{shc|<syntaxhighlight lang="bash"> | ||
npm update</syntaxhighlight>|$|/home/ | npm update</syntaxhighlight>|$|/home/kwy}} | ||
{{shc|<syntaxhighlight lang="bash"> | {{shc|<syntaxhighlight lang="bash"> | ||
npm upgrade</syntaxhighlight>|$|/home/ | npm upgrade</syntaxhighlight>|$|/home/kwy}} | ||
除了原生的 npm 命令之外,可以安装 cli 工具 npm-check-updates {{Version date|18.0.1|2025-4-24}} 对依赖进行更细致的分析。 | 除了原生的 npm 命令之外,可以安装 cli 工具 npm-check-updates {{Version date|18.0.1|2025-4-24}} 对依赖进行更细致的分析。 | ||
{{shc|<syntaxhighlight lang="bash"> | {{shc|<syntaxhighlight lang="bash"> | ||
npm install -g npm-check-updates</syntaxhighlight>|$|/home/ | npm install -g npm-check-updates</syntaxhighlight>|$|/home/kwy}} | ||
== 依赖清理 == | == 依赖清理 == | ||