chore: add web_commons build to prepare script

This commit is contained in:
LynithDev 2025-07-22 11:16:06 +02:00
parent efbc1d5c81
commit 5ac215a5c2
2 changed files with 15 additions and 1 deletions

View file

@ -23,7 +23,7 @@
"scripts": {
"prep": "pnpm scripts prep",
"typecheck": "pnpm -r typecheck",
"bootstrap": "cargo clean && ./packages/scripts/setup.sh && pnpm install && pnpm prep && pnpm codegen",
"bootstrap": "cargo clean && ./packages/scripts/setup.sh && pnpm install && pnpm prep",
"core": "pnpm --filter @onelauncher/core -- ",
"migrate": "sea-orm-cli migrate -d ./packages/migration",

View file

@ -1,3 +1,4 @@
import { exec } from 'node:child_process';
import { readFile, writeFile } from 'node:fs/promises';
import { consola } from 'consola';
import mustache from 'mustache';
@ -77,3 +78,16 @@ catch (error) {
consola.error(error);
env.__exit(1);
}
consola.start('building the web_commons package...');
exec('pnpm -w web_common build', { cwd: env.__root }, (error, stdout, stderr) => {
if (error) {
consola.error(`web_commons build failed: ${error.message}`);
env.__exit(1);
}
if (stderr)
consola.error(stderr);
consola.success('web_commons package built successfully!');
env.__exit(0);
});