init project
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
import { spawnSync } from 'node:child_process';
|
||||
|
||||
const commands = [
|
||||
['pnpm', ['validate']],
|
||||
['pnpm', ['format:check']],
|
||||
['pnpm', ['lint']],
|
||||
['pnpm', ['typecheck']],
|
||||
['pnpm', ['test:unit']],
|
||||
['pnpm', ['build'], { SITE_ORIGIN: 'http://127.0.0.1:3000', PUBLIC_RELEASE_APPROVED: 'false' }],
|
||||
['pnpm', ['audit']],
|
||||
];
|
||||
for (const [command, args, extraEnv = {}] of commands) {
|
||||
const result = spawnSync(command, args, {
|
||||
stdio: 'inherit',
|
||||
shell: process.platform === 'win32',
|
||||
env: { ...process.env, ...extraEnv },
|
||||
});
|
||||
if (result.status !== 0) process.exit(result.status ?? 1);
|
||||
}
|
||||
Reference in New Issue
Block a user