Likarolo tsa ho theha frontend
All-in-one JavaScript runtime. Bundler, tester, le package manager ka sesebelisoa se le seng se potlakileng
Qalo e potlakile ka makhetlo a 4 ho feta Node.js, 'me ts'ebetso e potlakile haholo ka enjine ea JavaScriptCore
Sebelisa TypeScript le JSX ka kotloloho ntle le mohato oa ho bokella, ho fetolela ka nako ea ho sebetsa
Kenya li-package tsa npm ka makhetlo a 30 ho feta npm, ka global cache le ts'ehetso e felletseng
Bundla liprojeke tsa JavaScript/TypeScript ka milliseconds ka code splitting, tree shaking le minification
Test runner e potlakileng e tšehetsang API ea Jest, e kenyelletsa mocking, snapshots le coverage
Runtime, bundler, transpiler, package manager le test runner ka binary e le 'ngoe
# Install Bun
curl -fsSL https://bun.sh/install | bash
# Verify installation
bun --version
# Update Bun to latest version
bun upgradeQalo e potlakileng - Theha projeke e ncha:# Initialize new project
bun init
# Run TypeScript/JavaScript file
bun run index.ts
# Install dependencies
bun install
# Run with watch mode (hot reload)
bun --watch run index.tsSebelisa projeke e teng ea Node.js:# Install dependencies (much faster than npm)
bun install
# Run with Bun runtime instead of Node
bun run start
# Or use as drop-in Node replacement
bun run dev
{
"scripts": {
"dev": "bun --watch run src/index.ts",
"build": "bun build src/index.ts --outdir dist",
"test": "bun test",
"start": "bun run dist/index.js"
}
}Bundling ka Bun:# Bundle for production
bun build ./src/index.ts --outdir ./dist --target browser
# Bundle with minification
bun build ./src/index.ts --outdir ./dist --minify
# Bundle for Node.js target
bun build ./src/index.ts --outdir ./dist --target nodeLiteko:# Run all tests
bun test
# Run specific test file
bun test auth.test.ts
# Watch mode
bun test --watch
# With coverage
bun test --coverageLintho tsa Tikoloho:.env ka boits'oareprocess.env kapa Bun.envQala ka metsotsoana ka ts'ebetso ea rona e bonolo ea ho kenya VPS
Ho kenya ka ho ka bang 2 metsotso • Full root ho kena • Thuto ka terene le lengolo tsoibila