Yarn

https://yarnpkg.com
https://github.com/yarnpkg/yarn

image.png
https://blog.csdn.net/weixin_56037622/article/details/118161314

yarn install

yarn build = yarn run build = npm run build
https://yarnpkg.com/cli/install

使用零安装时验证项目

  1. yarn install --immutable --immutable-cache

如果需要更新,不要生成yarn.lock锁定文件,yarn命令中止并返回错误代码且退出

  1. yarn install --frozen-lockfile

从远程位置重新下载包文件,并报告任何不匹配的校验和

  1. yarn install --check-cache

构建中优先使用缓存中

  1. yarn install --prefer-offline
  1. yarn install --production --pure-lockfile

不生成yarn.lock

  1. yarn install --pure-lock-file


Yarn

目录