修改npm镜像源

This commit is contained in:
whyour 2022-07-16 12:25:14 +08:00
parent 872519a213
commit f74821895e
2 changed files with 4 additions and 4 deletions

2
.npmrc
View File

@ -1,2 +1,2 @@
sentrycli_cdnurl=https://cdn.npm.taobao.org/dist/sentry-cli
sentrycli_cdnurl=https://npmmirror.com/mirrors/sentry-cli/
strict-peer-dependencies=false

View File

@ -245,11 +245,11 @@ fix_config() {
npm_install_sub() {
set_proxy
if [ $is_termux -eq 1 ]; then
npm install --production --no-bin-links --registry=https://registry.npm.taobao.org || npm install --production --no-bin-links
npm install --production --no-bin-links --registry=https://registry.npmmirror.com || npm install --production --no-bin-links
elif ! type pnpm &>/dev/null; then
npm install --production --registry=https://registry.npm.taobao.org || npm install --production
npm install --production --registry=https://registry.npmmirror.com || npm install --production
else
pnpm install --loglevel error --production --registry=https://registry.npm.taobao.org || pnpm install --production --loglevel error
pnpm install --loglevel error --production --registry=https://registry.npmmirror.com || pnpm install --production --loglevel error
fi
unset_proxy
}