.yarnrc 常用配置/dotfiles/全局配置

自己的 .yarnrc 常用配置
更新于: 2023-10-06 23:08:14

个人配置

"@alo7:registry" "https://repos.saybot.net/repository/alo7npm/"
"@jswork:registry" "https://registry.npmjs.org"
"@afeiship:registry" "https://npm.pkg.github.com"

公司项目

"@alo7:registry" "https://repos.saybot.net/repository/alo7npm/"
"@jswork:registry" "https://registry.npmjs.org"

token 相关

//npm.fury.io/USERNAME/:_authToken=SECRET-TOKEN

CheatSheet

常用的命令如下:"set, get, delete, list, current"

功能命令
列出所有配置
# 列出配置
yarn config list
# 列出查找过程
yarn config list --verbose
cypress 安装慢或者 NOT_FOUND
CYPRESS_INSTALL_BINARY "https://registry.npmmirror.com/-/binary/cypress/10.4.0/darwin-x64/cypress.zip"
CYPRESS_DOWNLOAD_MIRROR "https://registry.npmmirror.com/-/binary/cypress"

dotfiles 里默认配置

已经在 dotfiles/install.sh 脚本里初始化逻辑,如下:

cp .yarnrc.sample .yarnrc

# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
# yarn lockfile v1


registry "https://registry.npm.taobao.org/"
cache-folder ".yarn/cache"
enable-cache true
lastUpdateCheck 1692320057148
no-global true

参考