feat: SodiumPet 小钠桌宠 v0.1.0(Live2D 桌宠 / 经济任务 / 音乐 / 成就 / 编辑器 / MOD)

This commit is contained in:
Tian_XiaRi
2026-12-01 16:41:07 +08:00
commit d25e726ef7
261 changed files with 33676 additions and 0 deletions
+19
View File
@@ -0,0 +1,19 @@
import { spawn } from 'node:child_process'
import { fileURLToPath } from 'node:url'
import path from 'node:path'
const root = path.dirname(path.dirname(fileURLToPath(import.meta.url)))
const npx = process.platform === 'win32' ? 'npx.cmd' : 'npx'
const vite = spawn(npx, ['vite', '--port', '5273'], { cwd: root, stdio: 'inherit' })
setTimeout(() => {
const env = { ...process.env, VITE_DEV_SERVER_URL: 'http://localhost:5273' }
const electron = spawn(npx, ['electron', '.'], { cwd: root, stdio: 'inherit', env })
electron.on('exit', (code) => {
vite.kill()
process.exit(code ?? 0)
})
}, 1500)
vite.on('exit', (code) => process.exit(code ?? 0))