npm 与 yarn 对比
yarn 如何安装
npm i yarn -g
1. 初始化
yarn init -y
npm init -y
2.添加依赖
yarn add [package]
yarn add [package]@[version]
npm i [package]
npm i [package]@[version]
3.移除包
yarn remove [package]
npm uninstall [package]
4.安装项目全部依赖
yarn 或者 yarn install
npm 或者 npm install
5.全局
安装:yarn global add [package]
npm i [package] -g
卸载:yarn global remove [package]
npm uninstall [package] -g