mirror of
https://github.com/whyour/qinglong.git
synced 2025-07-27 14:46:06 +08:00
dev
This commit is contained in:
parent
585527a7e7
commit
efb8142cc6
|
@ -136,10 +136,14 @@ detect_config_version () {
|
||||||
|
|
||||||
## npm install 子程序,判断是否为安卓,判断是否安装有yarn
|
## npm install 子程序,判断是否为安卓,判断是否安装有yarn
|
||||||
npm_install_sub () {
|
npm_install_sub () {
|
||||||
local cmd_1 cmd_2
|
if [ $is_termux -eq 1 ]; then
|
||||||
type yarn >/dev/null 2>&1 && cmd_1=yarn || cmd_1=npm
|
npm install --production --no-save --no-bin-links --registry=https://registry.npm.taobao.org || npm install --production --no-bin-links --no-save
|
||||||
[[ $is_termux -eq 1 ]] && cmd_2="--no-bin-links" || cmd_2=""
|
elif ! type yarn >/dev/null 2>&1; then
|
||||||
$cmd_1 install $cmd_2 --registry=https://registry.npm.taobao.org || $cmd_1 install $cmd_2
|
npm install --production --no-save --registry=https://registry.npm.taobao.org || npm install --production --no-save
|
||||||
|
else
|
||||||
|
echo -e "检测到本机安装了 yarn,使用 yarn 替代 npm...\n"
|
||||||
|
yarn install --production --network-timeout 1000000000 --registry=https://registry.npm.taobao.org || yarn install --production --network-timeout 1000000000
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
## npm install,$1:package.json文件所在路径
|
## npm install,$1:package.json文件所在路径
|
||||||
|
|
Loading…
Reference in New Issue
Block a user