Add light build requiring bun installed
This commit is contained in:
parent
5abdf31480
commit
eb3bad289a
2 changed files with 18 additions and 2 deletions
13
justfile
13
justfile
|
|
@ -17,13 +17,22 @@ start:
|
||||||
check:
|
check:
|
||||||
bun run lint && bun run typecheck && bun run test
|
bun run lint && bun run typecheck && bun run test
|
||||||
|
|
||||||
# Build CLI binary (smallest possible)
|
build: build-cli build-bundle
|
||||||
|
@ls -lah dist/bin/
|
||||||
|
|
||||||
|
# Build CLI binary (standalone, ~100MB, no deps)
|
||||||
build-cli:
|
build-cli:
|
||||||
mkdir -p dist/bin
|
mkdir -p dist/bin
|
||||||
bun build --compile --minify --sourcemap=none src/cli.ts --outfile dist/bin/claude-remote
|
bun build --compile --minify --sourcemap=none src/cli.ts --outfile dist/bin/claude-remote
|
||||||
|
|
||||||
|
# Build CLI bundle (small, requires bun installed)
|
||||||
|
build-bundle:
|
||||||
|
mkdir -p dist/bin
|
||||||
|
bun build --minify --target bun src/cli.ts --outfile dist/bin/claude-remote.js
|
||||||
|
chmod +x dist/bin/claude-remote.js
|
||||||
|
|
||||||
# Docker build
|
# Docker build
|
||||||
build:
|
build-image:
|
||||||
docker build -t claude-remote .
|
docker build -t claude-remote .
|
||||||
|
|
||||||
up:
|
up:
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,13 @@
|
||||||
|
|
||||||
// PTY wrapper for claude CLI
|
// PTY wrapper for claude CLI
|
||||||
|
|
||||||
|
// Check for Bun runtime (only fails when running bundled .js with Node)
|
||||||
|
if (typeof Bun === "undefined") {
|
||||||
|
console.error("claude-remote requires Bun to run.");
|
||||||
|
console.error("Install Bun: https://bun.sh");
|
||||||
|
process.exit(1);
|
||||||
|
}
|
||||||
|
|
||||||
import type { IPty } from "bun-pty";
|
import type { IPty } from "bun-pty";
|
||||||
import { spawn } from "bun-pty";
|
import { spawn } from "bun-pty";
|
||||||
import type { ClientMessage, ServerMessage } from "./types";
|
import type { ClientMessage, ServerMessage } from "./types";
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue