抽离前端依赖,只再rebuild时安装

This commit is contained in:
whyour
2021-04-11 11:28:46 +08:00
parent 2a7d298f05
commit 2217f200dc
3 changed files with 17 additions and 16 deletions
+3 -3
View File
@@ -100,12 +100,12 @@ Npm_Install() {
## npm install 子程序,判断是否为安卓,判断是否安装有yarn
function Npm_InstallSub() {
if [ -n "$isTermux" ]; then
npm install --no-save --no-bin-links --registry=https://registry.npm.taobao.org || npm install --no-bin-links --no-save
npm install --production --no-save --no-bin-links || npm install --production --no-bin-links --no-save --registry=https://registry.npm.taobao.org
elif ! type yarn >/dev/null 2>&1; then
npm install --no-save --registry=https://registry.npm.taobao.org || npm install --no-save
npm install --production --no-save || npm install --production --no-save --registry=https://registry.npm.taobao.org
else
echo -e "检测到本机安装了 yarn,使用 yarn 替代 npm...\n"
yarn install --registry=https://registry.npm.taobao.org --network-timeout 1000000000 || yarn install
yarn install --production --network-timeout 1000000000 || yarn install --production --registry=https://registry.npm.taobao.org --network-timeout 1000000000
fi
}
+1
View File
@@ -9,6 +9,7 @@ git pull
echo -e "更新shell完成...\n"
echo -e "重新build...\n"
yarn install --network-timeout 1000000000 || yarn install --registry=https://registry.npm.taobao.org --network-timeout 1000000000
yarn build
yarn build-back
echo -e "重新build完成...\n"