1. Bundle entry
bun build bundles an entry file and its imports into output files.
bun build ./index.tsTyporithm · medium
Step 1 of 8 · intro card
bun CLI
bun build bundles an entry into --outdir for a --target; bunx runs a CLI once without installing (like npx); bun create scaffolds a project from a template.
bun build is Bun's bundler: point it at an entry file, choose an --outdir, and pick a --target like browser, bun, or node.
bunx runs a package's CLI on demand without adding it to your project, the way npx does, but faster.
bun create <template> bootstraps a fresh project from a known template, e.g. bun create next-app.
bun build bundles an entry to --outdir for a --target.
bunx runs a CLI once without installing it.
bun create scaffolds a project from a template.
bun build ./index.ts --outdir ./dist --target browser
bunx prettier --write .
bun create next-appConnect each part of the code to the concept before you type.
bun build bundles an entry file and its imports into output files.
bun build ./index.ts--outdir sets the directory where bundled output is written.
--outdir ./dist--target browser tunes the bundle for the browser; other targets include bun and node.
--target browserbunx runs a CLI from a package without installing it, like npx.
bunx prettier --write .bun create scaffolds a new project from a template, like create-next-app.
bun create next-appRead the concept map and follow the code breakdown.
Type the implementation, repair mistakes and work through every recall exercise.
Use the final check without hints; revisit weak concepts in short practice sessions.