Click the Use this template button to create a new repository with the contents starter.
OR
Run bun create andrei0x309/bun-lib-template-starter ./my-lib
.
Change lib.config.ts
to your needs.
Run bun run build
to build the library.
- Almost no dependencies.
- Generating types with rust.
- Degit command included.
- License generation command included
- Automatic version bump.
- Release command included.
- Automatic tag generation.
- Configurable by
lib.config.ts
- Cross-OS support.
- Only uses Bun bundler to bundle the library. (note Bun bundler only supports ESM modules)
- Option to omit types declaration generation (default is false)
- Option auto fill exports in package.json (default is true)
-
Creating type declarations without using typescript at the moment is only possible with
isolatedDeclarations
set totrue
in tsconfig.json, which means all types must be declared explicitly in your code. -
the folder
lib-tools
will not be included in the library, and is meant as a helper for the library creator. -
ATM This template is pretty basic but works with any OS, uses only bun bundler, and only supports ESM modules, intended for modern JS, I might add more features, if you think it's missing something create an issue
-
All config options in
lib.config.ts
are documented in/lib-tools/types/config-type.ts
- Initial release
MIT