抽离前端依赖,只再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

View File

@ -6,7 +6,7 @@
"build-back": "tsc -p tsconfig.back.json",
"start-back": "nodemon",
"pm2": "npm run build-back && node build/app.js",
"postinstall": "umi generate tmp",
"prepare": "umi generate tmp",
"prettier": "prettier --write '**/*.{js,jsx,tsx,ts,less,md,json}'",
"test": "umi-test",
"test:coverage": "umi-test --coverage"
@ -23,14 +23,10 @@
]
},
"dependencies": {
"@ant-design/pro-layout": "^6.5.0",
"@umijs/plugin-antd": "^0.9.1",
"body-parser": "^1.19.0",
"celebrate": "^13.0.3",
"codemirror": "^5.59.4",
"cors": "^2.8.5",
"cron-parser": "^3.3.0",
"darkreader": "^4.9.27",
"dotenv": "^8.2.0",
"express": "^4.17.1",
"express-jwt": "^6.0.0",
@ -38,18 +34,22 @@
"jsonwebtoken": "^8.5.1",
"nedb": "^1.8.0",
"node-fetch": "^2.6.1",
"qrcode.react": "^1.0.1",
"reflect-metadata": "^0.1.13",
"typedi": "^0.8.0",
"winston": "^3.3.3"
},
"devDependencies": {
"umi": "^3.3.9",
"umi-request": "^1.3.5",
"react-codemirror2": "^7.2.1",
"react-diff-viewer": "^3.1.1",
"react-dnd": "^14.0.2",
"react-dnd-html5-backend": "^14.0.0",
"reflect-metadata": "^0.1.13",
"typedi": "^0.8.0",
"umi": "^3.3.9",
"umi-request": "^1.3.5",
"winston": "^3.3.3"
},
"devDependencies": {
"qrcode.react": "^1.0.1",
"darkreader": "^4.9.27",
"codemirror": "^5.59.4",
"@ant-design/pro-layout": "^6.5.0",
"@umijs/plugin-antd": "^0.9.1",
"@types/cors": "^2.8.10",
"@types/express": "^4.17.8",
"@types/express-jwt": "^6.0.1",

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
}

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"