freeleaps_frontend/start_frontend.sh
2024-05-29 09:42:27 +08:00

19 lines
308 B
Bash

#! /bin/sh
DEPLOY_DIR="deploy"
REAL_PATH=$(dirname "$(realpath '$1'))")
pushd $REAL_PATH
if [ -d "$DEPLOY_DIR" ]
then
echo 'detect the existence of deploy folder, skip running the env.sh'
else
source env.sh
fi
pushd frontend
npm install
npm update
npm run build
npm run format
npm run dev
popd
popd