mirror of
https://github.com/wu736139669/hapi.git
synced 2026-08-05 06:24:37 +00:00
refactor: remove non-allinone build scripts and fix npm publish build command
Remove build:cli:exe and build:cli:exe:all scripts since building executables without web assets serves no practical purpose. Update npm publish script to use build:single-exe:all which includes embedded web assets in published packages.
This commit is contained in:
@@ -18,6 +18,7 @@ import { fileURLToPath } from 'node:url';
|
|||||||
|
|
||||||
const __dirname = dirname(fileURLToPath(import.meta.url));
|
const __dirname = dirname(fileURLToPath(import.meta.url));
|
||||||
const projectRoot = join(__dirname, '..');
|
const projectRoot = join(__dirname, '..');
|
||||||
|
const repoRoot = join(projectRoot, '..');
|
||||||
|
|
||||||
const PLATFORMS = [
|
const PLATFORMS = [
|
||||||
'darwin-arm64',
|
'darwin-arm64',
|
||||||
@@ -91,10 +92,10 @@ async function main(): Promise<void> {
|
|||||||
process.exit(1);
|
process.exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Build binaries
|
// Build binaries (includes web assets)
|
||||||
if (!skipBuild) {
|
if (!skipBuild) {
|
||||||
console.log('\n[2/5] Building binaries for all platforms...');
|
console.log('\n[2/5] Building binaries for all platforms (with web assets)...');
|
||||||
run('bun run build:exe:all');
|
run('bun run build:single-exe:all', repoRoot);
|
||||||
} else {
|
} else {
|
||||||
console.log('\n[2/5] Skipping build (--skip-build)');
|
console.log('\n[2/5] Skipping build (--skip-build)');
|
||||||
if (!checkBinariesExist()) {
|
if (!checkBinariesExist()) {
|
||||||
|
|||||||
@@ -6,8 +6,6 @@
|
|||||||
"dev": "concurrently \"bun run dev:server\" \"bun run dev:web\" --kill-others-on-exit",
|
"dev": "concurrently \"bun run dev:server\" \"bun run dev:web\" --kill-others-on-exit",
|
||||||
"build": "bun run build:cli && bun run build:server && bun run build:web",
|
"build": "bun run build:cli && bun run build:server && bun run build:web",
|
||||||
"build:cli": "cd cli && bun run build",
|
"build:cli": "cd cli && bun run build",
|
||||||
"build:cli:exe": "cd cli && bun run build:exe",
|
|
||||||
"build:cli:exe:all": "cd cli && bun run build:exe:all",
|
|
||||||
"build:single-exe": "bun run build:web && (cd server && bun run generate:embedded-web-assets) && (cd cli && bun run build:exe:allinone)",
|
"build:single-exe": "bun run build:web && (cd server && bun run generate:embedded-web-assets) && (cd cli && bun run build:exe:allinone)",
|
||||||
"build:single-exe:all": "bun run build:web && (cd server && bun run generate:embedded-web-assets) && (cd cli && bun run build:exe:allinone:all)",
|
"build:single-exe:all": "bun run build:web && (cd server && bun run generate:embedded-web-assets) && (cd cli && bun run build:exe:allinone:all)",
|
||||||
"build:server": "cd server && bun run build",
|
"build:server": "cd server && bun run build",
|
||||||
|
|||||||
Reference in New Issue
Block a user