Skip to content

WhizUs/bun-starter

Repository files navigation

WhizUs bun-starter

Bun Typescript starter template

use with bun create:

bun create WhizUs/bun-starter

Optionally specify a name for the destination folder. If no destination is specified, the repo name will be used.

bun create WhizUs/bun-starter my-bun-project

Features

  • pre-configured lint and editorconfig
    • biome
      • lint code
      • format code
  • pre-commit hook using husky
  • mise-en-place config
    • to get current version of bun automatically

Contribute

install dev runtimes

  • use rtx
    • if it doesn't auto install bun and serverless run rtx install
  • or install manually

install dependencies

  • run bun install

try out the functions locally

  • bun dev starts a local dev server in watch mode

tests

Write all your tests in the folder tests. There should be one testfile per ts file. A test file should be named like this: <filename>.test.ts. The folder structure should be as in src.

  • run all tests: bun test
  • run all test in watch mode: bun test-watch
  • run tests for a single test file: bun test <filename incl path>
  • run tests for a single test file in watch mode: bun test --watch <filename incl path>

commit

We use conventional commits for our commit messages.

before you commit make sure you run and check following:

  • bun lint - check code style (bun lint-fix to fix automatically)
  • bun ec - check editorconfig
  • bun test - check if your tests pass

sign your commits

Dependencies

Super fast javascript runtime.

TypeScript framework supercharged by Bun with End-to-End Type Safety, unified type system and outstanding developer experience

About

Bun Typescript starter template

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published