Skip to content

omnidotdev/template-typescript-library

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

5 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

πŸ“˜ TypeScript Library Template

This is a template repository for a TypeScript library for Omni projects.

Features

  • πŸš€ Modern Stack: Built with Bun and TypeScript for fast development and runtime performance
  • πŸ“¦ ESM Output: Fast builds via Bun bundler with TypeScript declarations
  • πŸ§ͺ Testing: Bun test runner for fast, native TypeScript testing
  • πŸ› οΈ Developer Experience:
    • Hot reloading during development with watch mode
    • Code quality with Biome for linting and formatting
    • Git hooks with Husky
    • TypeScript strict mode with comprehensive type safety
    • Knip for unused dependency detection
    • Automated updates with Renovate
    • Easy spin up with Tilt
  • 🚒 Production Ready:
    • Changesets for versioning and changelog generation
    • GitHub Actions for CI/CD (testing, preview publishing, releases)
    • Automatic type declaration generation

Local Development

Installation

bun install

Building and Running

Run tilt up, or:

bun dev       # watch mode
bun build     # build the library
bun test      # run tests
bun check     # lint and format check
bun knip      # check for unused dependencies

Building

bun run build

Outputs to build/ with ESM format and TypeScript declarations.

Testing

bun test

Creating a New Library

  1. Replace @omnidotdev/template-typescript-library with your package name in:

    • package.json
    • .changeset/config.json
  2. Update repository URLs in package.json

  3. Add your source code to src/

  4. Add tests to test/

Scripts

Script Description
bun dev Watch mode for development
bun build Build the library
bun test Run tests
bun check Run biome check
bun lint Run biome lint with fixes
bun format Run biome format with fixes
bun knip Check for unused dependencies
bun clean Remove build artifacts and node_modules
bun release Build and publish via changesets

License

The code in this repository is licensed under MIT, Β© Omni LLC. See LICENSE.md for more information.

About

πŸ“˜ TypeScript library template

Topics

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

  •  

Packages

 
 
 

Contributors