yarn的使用
-
文档地址:https://yarn.bootcss.com/
安装
npm install --global yarn
检查是否安装成功
yarn --version
初始化一个项目
yarn init
添加依赖包
yarn add [package]
yarn add [package]@[version]
yarn add [package]@[tag]
升级依赖包
yarn upgrade [package]
yarn upgrade [package]@[version]
yarn upgrade [package]@[tag]
删除依赖包
yarn remove [package]
安装项目的所有依赖
yarn 或 yarn install
vue项目切换默认包管理器地址:
c:/user/.vuerc 中将packageManager设置为yarn
{ "useTaobaoRegistry": true, "latestVersion": "5.0.4", "lastChecked": 1648283171740, "packageManager": "npm" // yarn }
-