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

3
.gitignore vendored
View File

@@ -21,6 +21,9 @@ pnpm-debug.log*
# macOS-specific files # macOS-specific files
.DS_Store .DS_Store
# dev server pid
.dev.pid
# jetbrains setting folder # jetbrains setting folder
.idea/ .idea/
.pnpm-store .pnpm-store

View File

@@ -3,7 +3,7 @@
"type": "module", "type": "module",
"version": "0.0.1", "version": "0.0.1",
"scripts": { "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", "build": "astro build",
"preview": "astro preview", "preview": "astro preview",
"astro": "astro" "astro": "astro"