Build api-server and cli as compiled binaries

- Rename api-server package to @reviq/api-server
- Add --compile flag to bun build for both packages
- Output standalone executables instead of bundled JS

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
RevIQ
2026-01-09 17:11:20 +08:00
parent a66511a80d
commit 9158146462
2 changed files with 4 additions and 4 deletions

View File

@@ -1,11 +1,11 @@
{ {
"name": "api-server", "name": "@reviq/api-server",
"version": "0.0.0", "version": "0.0.0",
"private": true, "private": true,
"type": "module", "type": "module",
"scripts": { "scripts": {
"dev": "bun run --hot src/index.ts", "dev": "bun run --hot src/index.ts",
"build": "bun build src/index.ts --outdir dist", "build": "bun build src/index.ts --compile --outfile dist/api-server",
"typecheck": "tsc --noEmit", "typecheck": "tsc --noEmit",
"lint": "eslint . --cache", "lint": "eslint . --cache",
"clean": "rm -rf dist .eslintcache", "clean": "rm -rf dist .eslintcache",

View File

@@ -4,10 +4,10 @@
"private": true, "private": true,
"type": "module", "type": "module",
"bin": { "bin": {
"reviq": "./dist/index.js" "reviq": "./dist/reviq"
}, },
"scripts": { "scripts": {
"build": "bun build src/bin/reviq.ts --outdir dist --target bun", "build": "bun build src/bin/reviq.ts --compile --outfile dist/reviq",
"cli": "bun run src/bin/reviq.ts", "cli": "bun run src/bin/reviq.ts",
"typecheck": "tsc --noEmit", "typecheck": "tsc --noEmit",
"lint": "eslint . --cache", "lint": "eslint . --cache",