Some checks failed
farmcontrol/farmcontrol-server/pipeline/head There was a failure building this commit
- Updated electrobun.config.ts to include environment-based settings for stability and external dependencies. - Refactored package.json scripts for improved build processes and streamlined commands. - Added new build scripts for Linux and renderer, while removing the obsolete build-server script. - Enhanced pre-build validation to ensure required files are present and added logging for better visibility. - Updated clean-build script to remove additional artifact directories for thorough cleanup.
23 lines
552 B
JavaScript
23 lines
552 B
JavaScript
import { spawnSync } from "node:child_process";
|
|
import path from "node:path";
|
|
import { fileURLToPath } from "node:url";
|
|
|
|
const rootDir = path.resolve(path.dirname(fileURLToPath(import.meta.url)), "..");
|
|
|
|
const result = spawnSync("bun", ["x", "vite", "build", "src/app"], {
|
|
cwd: rootDir,
|
|
stdio: "inherit",
|
|
env: {
|
|
...process.env,
|
|
NODE_ENV: process.env.NODE_ENV || "production",
|
|
},
|
|
});
|
|
|
|
if (result.status !== 0) {
|
|
process.exit(result.status ?? 1);
|
|
}
|
|
|
|
console.log(
|
|
`build-renderer: output at ${path.join(rootDir, "dist/mainview")}`,
|
|
);
|