Skip to content

Commands

Pick your package manager. Commands change for each one.

Start Dev Server

bash
npm run dev
bash
bun dev
bash
pnpm dev
bash
yarn dev

Opens http://localhost:5173. Changes show instantly.

Build for Production

bash
npm run build
bash
bun run build
bash
pnpm build
bash
yarn build

Creates dist/ folder. Upload this to your server.

Why bun run build not bun build?

These are different commands:

CommandWhat It Does
bun buildUses Bun's bundler
bun run buildRuns the "build" script in package.json

We use bun run build because it runs Vite's bundler.

Why Vite, not Bun's bundler?

  • Vite has more features
  • Vite has more plugins
  • Vite is tested with React for years

Bun is fast for running code. Vite is better for building.

Check Code

bash
npm run check
bash
bun check
bash
pnpm check
bash
yarn check

Runs all checks:

  • ESLint (find bugs)
  • Prettier (check format)
  • TypeScript (check types)

Find Bugs (Lint)

bash
npm run lint
bash
bun lint
bash
pnpm lint
bash
yarn lint

Fix bugs automatically:

bash
npm run lint -- --fix
bash
bun lint --fix
bash
pnpm lint --fix
bash
yarn lint --fix

Format Code

bash
npm run format
bash
bun format
bash
pnpm format
bash
yarn format

Makes code look nice. Fixes spacing, quotes, etc.

Run Tests

bash
npm test
bash
bun test
bash
pnpm test
bash
yarn test

Runs tests. Watches for changes.

Run once (for CI):

bash
npm run test:run
bash
bun test:run
bash
pnpm test:run
bash
yarn test:run

Remove Demo Content

bash
npm run clean
bash
bun clean
bash
pnpm clean
bash
yarn clean

Removes demo files. Gives you clean "Hello World" app.

All Commands

CommandWhat It Does
devStart dev server
buildBuild for production
checkRun all checks
lintFind bugs
formatMake code pretty
testRun tests (watch)
test:runRun tests (once)
cleanRemove demo files

Released under the MIT License.