https://github.com/nothingrandom/bun-package-starter
A starter template for creating node packages using bun.
https://github.com/nothingrandom/bun-package-starter
Last synced: about 1 year ago
JSON representation
A starter template for creating node packages using bun.
- Host: GitHub
- URL: https://github.com/nothingrandom/bun-package-starter
- Owner: nothingrandom
- License: mit
- Created: 2025-02-17T17:36:01.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-02-17T17:41:28.000Z (about 1 year ago)
- Last Synced: 2025-02-17T18:39:50.860Z (about 1 year ago)
- Language: JavaScript
- Size: 33.2 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# bun-package-starter
A starter template for creating a new node package using bun.
Complete with linting, testing, and building.
## Features
- Typescript v5
- strict mode
- Bun v1.2
- Eslint v9
- Github Actions; for `CI` and `publish` to npm
- Write CLI scripts with support of [meow](https://www.npmjs.com/package/meow)
## Usage
Click the [use this template](https://github.com/nothingrandom/bun-package-starter/generate) button to create a new repo with this starter kit.
OR
Run `bun create nothingrandom/bun-package-starter ./my-package`
## Setup
```bash
# install dependencies
bun install
# run tests
bun test
# run lint, see eslint.config.js
bun run lint
# build the package to dist/
# comes with typescript declaration files
bun run build
```
## Publishing
- Setup a `NPM_TOKEN` secret in your Github repository; which should be a ["automation" access token](https://docs.npmjs.com/about-access-tokens)
- Update the `name`, `description`, `repository`, `author`, and `license` fields in `package.json`
- Update the version in `package.json`
- Commit the changes
- Publish a new release on Github
- Github Actions will publish the package to npm