Skip to content
This repository was archived by the owner on Oct 9, 2026. It is now read-only.
Public archive

About

🥐 A simple template to build libraries using Bun

Resources

Stars

1 star

Watchers

0 watching

Forks

Repository files navigation

🥐 pastry

A simple template to build libraries with Bun

Important

Pastry is archived. Start new libraries from keel, which uses pnpm, tsdown, Adamantite, and Packref.

Pastry is a simple template for open-source packages that use Bun.

Use the template

  1. Select Use this template on GitHub.

  2. Clone your new repository.

  3. Install the dependencies:

    bun install
  4. Set the package information:

    bun run init

The init command updates package.json, README.md, LICENSE, knip.config.ts, and tsconfig.json. It removes template documentation, pending changesets, the init command, and @clack/prompts. It empties CONTEXT.md. Run it only one time.

Develop the package

Write the package source in src. Write tests next to the source or in src/__tests__.

Use these commands:

bun run dev       # Build when a source file changes.
bun run build     # Build the package in dist.
bun run test      # Run the tests.
bun run check     # Check lint rules and TypeScript types.
bun run format    # Format the files.
bun run analyze   # Find unused files and dependencies.

Included tools

  • Bun runs scripts and tests.
  • Bunup builds the package.
  • Adamantite checks and formats the code.
  • Changesets manages versions and changelogs.
  • GitHub Actions checks, tests, builds, and publishes the package.
  • Dependabot updates Bun dependencies and GitHub Actions.

Release a change

Create a changeset for a change that affects package users:

bun changeset

Commit the changeset with the code. The release workflow creates a release pull request. After you merge that pull request, the workflow publishes the package to npm.

Configure npm trusted publishing before the first release. In npm, connect the package to this GitHub repository and to .github/workflows/release.yml.

Migrate a project

See Migrate a project.

License

Pastry uses the MIT License.

About

🥐 A simple template to build libraries using Bun

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages