🎉 init: 小龙的工作空间

This commit is contained in:
大海
2026-06-06 10:40:48 +08:00
commit a188ee1426
3201 changed files with 231817 additions and 0 deletions
+26
View File
@@ -0,0 +1,26 @@
#!/usr/bin/env node
/**
* Build script — builds both web and api.
* Usage: node scripts/build.mjs
*/
import { execSync } from "node:child_process";
const ROOT = new URL("..", import.meta.url).pathname;
function run(cmd, cwd) {
console.log(`\n🔨 ${cmd} (in ${cwd})`);
execSync(cmd, { cwd, stdio: "inherit" });
}
console.log("🏗️ Building fullstack project...\n");
try {
run("npm run build", `${ROOT}/apps/api`);
run("npm run build", `${ROOT}/apps/web`);
console.log("\n✅ Build complete!");
} catch (e) {
console.error("\n❌ Build failed:", e.message);
process.exit(1);
}