Initial project import

This commit is contained in:
inman
2026-07-23 15:43:23 +08:00
commit 63b4959b6b
36 changed files with 18207 additions and 0 deletions

22
scripts/dev-full.mjs Normal file
View File

@@ -0,0 +1,22 @@
import { spawn } from 'node:child_process';
const commands = [
['node', ['server/cms-server.mjs']],
['npm', ['run', 'dev', '--', '--host', '127.0.0.1']],
];
const children = commands.map(([cmd, args]) => {
const child = spawn(cmd, args, { stdio: 'inherit', shell: false });
child.on('exit', (code) => {
if (code && code !== 0) {
children.forEach((item) => item.pid !== child.pid && item.kill());
process.exit(code);
}
});
return child;
});
process.on('SIGINT', () => {
children.forEach((child) => child.kill('SIGINT'));
process.exit(0);
});