Some checks reported errors
farmcontrol/farmcontrol-ui/pipeline/head Something is wrong with the build of this commit
- Created electrobun.config.ts to define application settings and build parameters. - Added build-macos.mjs script to handle macOS builds, including architecture targeting. - Introduced finalize-desktop-artifacts.mjs for managing post-build processes and artifact publishing. - Implemented pre-build.mjs for validating required files before the build process. - Added utility scripts for managing release artifacts and syncing views. - Established desktop-specific functionalities in the src/desktop directory, including app update handling and menu management. - Updated .gitignore to include dist directory and test results for cleaner repository management. - Introduced bun.lock for dependency management with Bun.
52 lines
1.2 KiB
TypeScript
52 lines
1.2 KiB
TypeScript
import type { ElectrobunConfig } from "electrobun";
|
|
import { readFileSync } from "node:fs";
|
|
|
|
const packageJson = JSON.parse(readFileSync("./package.json", "utf8"));
|
|
|
|
export default {
|
|
app: {
|
|
name: "Farm Control",
|
|
identifier: "com.tombutcher.farmcontrol",
|
|
version: packageJson.version,
|
|
description: "3D Printer ERP and Control Software.",
|
|
urlSchemes: ["farmcontrol"],
|
|
},
|
|
runtime: {
|
|
exitOnLastWindowClosed: true,
|
|
},
|
|
build: {
|
|
buildFolder: "build",
|
|
artifactFolder: "app_dist",
|
|
bun: {
|
|
entrypoint: "src/bun/index.js",
|
|
},
|
|
copy: {
|
|
"dist/mainview": "views/mainview",
|
|
},
|
|
watch: ["scripts"],
|
|
watchIgnore: ["dist/**", "build/**", "app_dist/**"],
|
|
mac: {
|
|
bundleCEF: false,
|
|
icon: "assets/logos/farmcontrolicon.png",
|
|
},
|
|
linux: {
|
|
bundleCEF: false,
|
|
icon: "assets/logos/farmcontrolicon.png",
|
|
},
|
|
win: {
|
|
bundleCEF: false,
|
|
icon: "assets/logos/farmcontrolicon.png",
|
|
},
|
|
},
|
|
scripts: {
|
|
preBuild: "scripts/pre-build.mjs",
|
|
postPackage: "scripts/finalize-desktop-artifacts.mjs",
|
|
},
|
|
release: {
|
|
baseUrl:
|
|
process.env.ELECTROBUN_RELEASE_BASE_URL ||
|
|
process.env.RELEASE_BASE_URL ||
|
|
"",
|
|
},
|
|
} satisfies ElectrobunConfig;
|