mcpField
B
bun-build

bun-build

github.com/laurigatesDevelopment5955 installsUpdated 1d ago
Repository

About bun-build

bun-build is a skill for bundling JavaScript or TypeScript entry points with Bun, or compiling them into standalone executables. It covers minification, source maps, and browser, Bun, and Node.js targets.

Key features

  1. 01Bundle JavaScript and TypeScript
  2. 02Compile standalone executables
  3. 03Minify build output
  4. 04Generate source maps
  5. 05Select browser, Bun, or Node.js target
  6. 06Review generated files and sizes

Use cases

  1. 01Creating a production bundle from an entry point
  2. 02Compiling an app into an executable
  3. 03Building for browser, Bun, or Node.js
  4. 04Checking files and sizes after a build

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/laurigates/claude-plugins --skill bun-build

After installing, type/bun-buildin Claude Code to confirm it loaded.

Details

From the project README

/bun:build

Bundle JavaScript/TypeScript or compile to standalone executable.

When to Use This Skill

ScenarioUse this skillAlternative
Quick production bundle of an entry pointYesN/A
Compiling to a standalone executableYesN/A
Building for a specific target (browser/bun/node)YesN/A
Configuring complex build pipelinesNo - use bun-developmentFull build configuration guidance
Running project build scripts (bun run build)No - use bun-developmentN/A

Parameters

  • entry (required): Entry point file
  • --compile: Create standalone executable
  • --minify: Minify output

Execution

Production bundle:

bun build $ENTRY --outdir=dist --minify --sourcemap=external

Standalone executable:

bun build --compile --minify $ENTRY --outfile={{ OUTFILE | default: "app" }}

Development bundle:

bun build $ENTRY --outdir=dist --sourcemap=inline

Build Targets

# Browser (default)
bun build $ENTRY --target=browser --outdir=dist

# Bun runtime
bun build $ENTRY --target=bun --outdir=dist

# Node.js
bun build $ENTRY --target=node --outdir=dist

Post-build

  1. Report output file sizes
  2. List generated files in output directory
  3. For --compile: verify executable runs with ./app --help or similar

Comments

Markdown supported