- перенесены каноны и VitePress-конфиги в projects/<slug> - добавлены корневой и проектные build.ts для сборки артефактов - добавлены shared-библиотеки сборки в projects/_shared/lib - обновлены CI, Dockerfile, package.json, gitignore и README - удалена сборка frontend-агента
13 lines
385 B
TypeScript
13 lines
385 B
TypeScript
import { spawnSync } from 'node:child_process';
|
|
|
|
export function run(command: string, args: string[], cwd = process.cwd()) {
|
|
const result = spawnSync(command, args, {
|
|
cwd,
|
|
stdio: 'inherit',
|
|
shell: process.platform === 'win32',
|
|
});
|
|
|
|
if (result.error) throw result.error;
|
|
if (result.status !== 0) throw new Error(`Command failed: ${[command, ...args].join(' ')}`);
|
|
}
|