- Command Comparation
- Reference
Command Comparation
作用 | npm | Yarn |
---|---|---|
安装 | npm install(i) | yarn |
卸载 | npm uninstall(un) | yarn remove |
全局安装 | npm install xxx –-global(-g) | yarn global add xxx |
安装包 | npm install xxx –save(-S) | yarn add xxx |
开发模式安装包 | npm install xxx –save-dev(-D) | yarn add xxx –dev(-D) |
更新 | npm update –save | yarn upgrade |
全局更新 | npm update –global | yarn global upgrade |
卸载 | npm uninstall [–save/–save-dev] | yarn remove xx |
清除缓存 | npm cache clean | yarn cache clean |
重装 | rm -rf node_modules && npm install | yarn upgrade |
Reference
https://blog.csdn.net/qq_40963664/article/details/82768227