mirror of
https://github.com/whyour/qinglong.git
synced 2025-05-22 22:36:06 +08:00
使用 pnpm 代替 yarn
This commit is contained in:
parent
aa61fa7a45
commit
e7355842d9
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -6,6 +6,7 @@
|
||||||
/yarn-error.log
|
/yarn-error.log
|
||||||
/yarn.lock
|
/yarn.lock
|
||||||
/package-lock.json
|
/package-lock.json
|
||||||
|
/pnpm-lock.yaml
|
||||||
|
|
||||||
# production
|
# production
|
||||||
/dist
|
/dist
|
||||||
|
|
|
@ -33,7 +33,8 @@ RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories
|
||||||
&& chmod 777 ${QL_DIR}/shell/*.sh \
|
&& chmod 777 ${QL_DIR}/shell/*.sh \
|
||||||
&& chmod 777 ${QL_DIR}/docker/*.sh \
|
&& chmod 777 ${QL_DIR}/docker/*.sh \
|
||||||
&& npm install -g pm2 \
|
&& npm install -g pm2 \
|
||||||
|
&& npm install -g pnpm \
|
||||||
&& rm -rf /root/.npm \
|
&& rm -rf /root/.npm \
|
||||||
&& yarn install --production --network-timeout 100000 \
|
&& pnpm install --prod \
|
||||||
&& yarn cache clean
|
&& rm -rf /root/.pnpm-store
|
||||||
ENTRYPOINT ["./docker/docker-entrypoint.sh"]
|
ENTRYPOINT ["./docker/docker-entrypoint.sh"]
|
|
@ -195,15 +195,15 @@ fix_config() {
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
## npm install 子程序,判断是否为安卓,判断是否安装有yarn
|
## npm install 子程序,判断是否为安卓,判断是否安装有pnpm
|
||||||
npm_install_sub() {
|
npm_install_sub() {
|
||||||
if [ $is_termux -eq 1 ]; then
|
if [ $is_termux -eq 1 ]; then
|
||||||
npm install --production --no-save --no-bin-links --registry=https://registry.npm.taobao.org || npm install --production --no-bin-links --no-save
|
npm install --production --no-save --no-bin-links --registry=https://registry.npm.taobao.org || npm install --production --no-bin-links --no-save
|
||||||
elif ! type yarn >/dev/null 2>&1; then
|
elif ! type pnpm >/dev/null 2>&1; then
|
||||||
npm install --production --no-save --registry=https://registry.npm.taobao.org || npm install --production --no-save
|
npm install --production --no-save --registry=https://registry.npm.taobao.org || npm install --production --no-save
|
||||||
else
|
else
|
||||||
echo -e "检测到本机安装了 yarn,使用 yarn 替代 npm...\n"
|
echo -e "检测到本机安装了 pnpm,使用 pnpm 替代 ...\n"
|
||||||
yarn install --production --network-timeout 1000000000 --registry=https://registry.npm.taobao.org || yarn install --production --network-timeout 1000000000
|
pnpm install --prod --registry=https://registry.npm.taobao.org || pnpm install --prod
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user