https://github.com/sovlookup/bunco
Compile JS/TS to one single executable file using Bun. Alternative for pkg nexe and ncc but fastest.
https://github.com/sovlookup/bunco
bun cross-compile ncc nexe nodejs pkg
Last synced: 3 months ago
JSON representation
Compile JS/TS to one single executable file using Bun. Alternative for pkg nexe and ncc but fastest.
- Host: GitHub
- URL: https://github.com/sovlookup/bunco
- Owner: SOVLOOKUP
- Created: 2025-02-22T09:49:11.000Z (3 months ago)
- Default Branch: main
- Last Pushed: 2025-02-22T10:36:27.000Z (3 months ago)
- Last Synced: 2025-02-22T11:19:06.912Z (3 months ago)
- Topics: bun, cross-compile, ncc, nexe, nodejs, pkg
- Language: TypeScript
- Homepage:
- Size: 14.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.MD
Awesome Lists containing this project
README
# bunco
Compile JS/TS to one single executable file using Bun. Alternative for pkg and ncc.
- compile
```bash
$ bun x bunco ./src/main.ts
./compile
│
└─main-windows-x64.exe
```- cross compile and compress
```bash
$ bun x bunco -t all -c ./src/main.ts
./compile
│ main-darwin-arm64
│ main-darwin-x64
│ main-linux-arm64
│ main-linux-x64
│ main-windows-x64.exe
│
└─compressed
main-darwin-arm64.7z
main-darwin-x64.7z
main-linux-arm64.7z
main-linux-x64.7z
main-windows-x64.7z
```## bunco -h
```bash
$ bunco -h
Usage: bunco [options] >CLI to compile JS/TS file to one single executable file using Bun
Arguments:
inputFile file to compileOptions:
-V, --version output the version number
-t, --target platform/arch target | support: all or linux-x64,linux-arm64,windows-x64,darwin-x64,darwin-arm64
-o, --outputDir output directory | default: compile
-n, --name output name
-i, --iconPath icon path
-c, --compress compress output to outputDir/compressed
-m, --hideConsole hide console window
-b, --bytecode compile to bytecode
-h, --help display help for command
```## API
```ts
import { compile } from "bunco"await compile({
outputDir,
inputFile,
target,
compress,
hideConsole,
icon,
name,
bytecode,
});
```