TypeScript Starter Kit
This is an opinionated TypeScript Starter kit to help kick-start development of your next npm package.
💡
Get Started
Luckily, it's incredibly easy to get your package development started with this slightly opinionated starter kit.
# you may use this GitHub template or the following command:
npx degit openweblabs/ts-starter my-pkg
cd my-pkg
# if you don't have pnpm installed, run `npm i -g pnpm`
pnpm i # install all deps
pnpm build # builds the library for production-ready use
👩🏽💻 Dev Tools
- TypeScript 4.6
- unbuild - "Next Generation Frontend Tooling"
- Commitizen & commitlint - Automate git commits, versioning, and CHANGELOG generation
- Vitest - Unit testing powered by Vite
- Renovate - automatic PR dependency updates
- GitHub Actions - automatically fixes code style issues, tags releases, and runs the test suite
- ESLint - statically analyzes your code to quickly find problems
- VS Code Extensions
- cspell - spell checking
Tips
This project includes a simple way to handle & automate your "versioning." Through semantic commit names, two separate changelogs are generated upon a release: one as part of the GitHub releases & the other one as a markdown file that's created within the root of the project.
# how to create a git commit?
git add . # select the changes you want to commit
pnpm run commit # then simply answer the questions
# after you have successfully committed, you may create a "release"
pnpm run release # automates git commits, versioning, and CHANGELOG generation
# how to test your library locally?
pnpm pack # packs the library into a tarball
🧪
Testing
pnpm test
📈
Changelog
Please see our releases page for more information on what has changed recently.
💪🏼 Contributing
Please see CONTRIBUTING for details.
🏝
Community
For help, discussion about best practices, or any other conversation that would benefit from being searchable:
For casual chit-chat with others using this package:
Join the Open Web Discord Server
??
License
The MIT License (MIT). Please see LICENSE for more information.
Made with