turbobun

Bun + Biome Turborepo, with basic Elysia and Next.js apps and commits conventions

MIT License

Stars
0
Committers
2

Basic template for Modern Full Stack Web Developers. Powered with several Linting Tools and Commit Hooks, it will help you code faster and better.

Features

See ROADMAP

Monorepo features

Commit Conventions and Git Hooks

Linters

Demo apps

Getting started

bunx degit mugencraft/turbobun my-app
cd my-app
bun install

To run:

bun dev

Monorepo Internal Packages

To reference packages use the workspace:* key (see workspaces) :

{
  "name": "pkg-a",
  "dependencies": {
    "pkg-b": "workspace:*"
  }
}

Bun Actions

Using --filter, you can run the dev script in all packages in parallel:

  • bun --filter '*' dev
  • bun --filter './apps/**' dev
  • bun --filter './packages/**'
  • bun --filter './packages/foo'

Bun CLI Docs:

Available Bun Actions

# Show Available actions
bun run

Generators

Learn more about Turborepo Generators at turbo: code-generation

Generate New app or package:

turbo gen workspace

Generate Code:

Turborepo uses a simplified Plop configuration.

Known issue: ESM dependencies are not currently supported within custom generators.

For examples check also turbo-codemod generators

Workflow

Commit, Conventions and Hooks

You are free to install the Git Hooks to enforce standards, it's not mandatory. Some coders don't like it and a wrong configuring will slow you down.

You can run checkers and linters.

If a check fails your commit fails.

If a linter change something automatically you can have unwanted behaviors.

To install, run:

lefthook install

To enforce hooks installation add this to packages.json:

{
  "scripts": {
    "postinstall": "lefthook install"
  }
}

GitHub Actions

CHANGELOG, versioning and publishing is managed by Changesets

CI/CD and deploy will be managed by Vercel.

There is no need for GitHub Actions

Changesets

To record a change, run:

bun changeset

Follow the prompts to describe the changes. Changesets will create a markdown file in the .changeset directory detailing the changes.

Versioning

When it's time to release, run:

bun changeset version

This command will bump the versions of the affected packages and update the changelogs.

Publishing to npm

To publish the packages to npm, run:

bun changeset publish

If you want to publish package to the public npm registry and make them publicly available, this is already setup.

To publish packages to a private npm organization scope, remove the following from each of the package.json's

- "publishConfig": {
- "access": "public"
- },

GitHub Package Registry

See Working with the npm registry

Contributing to TurboBun

Check CONTRIBUTING for

Inspired By

License

MIT License