优化终端命令

This commit is contained in:
kuaifan 2022-02-23 16:03:54 +08:00
parent 7b1b7d1372
commit 337b3e5b5d

7
cmd
View File

@ -117,6 +117,13 @@ run_electron() {
mkdir -p ./electron/public
cp ./electron/index.html ./electron/public/index.html
#
if [ "$argv" == "dev" ]; then
run_exec php "php bin/run --mode=dev"
else
run_exec php "php bin/run --mode=prod"
fi
supervisorctl_restart php
#
if [ "$argv" != "dev" ] && [ "$argv" != "--nobuild" ]; then
npx mix --production -- --env --electron
fi