fix:强制为单实例启动

This commit is contained in:
“dongming”
2025-12-29 01:08:12 +08:00
parent 757a0b2030
commit fa17486916
2 changed files with 4 additions and 1 deletions

View File

@@ -3,7 +3,7 @@
"type": "module",
"version": "0.0.1",
"scripts": {
"dev": "astro dev",
"dev": "[ -f .dev.pid ] && kill -0 $(cat .dev.pid) 2>/dev/null && echo '开发服务器已在运行 (PID: '$(cat .dev.pid)')' || (astro dev & echo $! > .dev.pid)",
"build": "astro build",
"preview": "astro preview",
"astro": "astro"