Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/stacksjs/bun-plugin-dts-auto
Automatically generate your TypeScript dts types (and sourcemaps), using Bun's bundler.
https://github.com/stacksjs/bun-plugin-dts-auto
bun bun-plugin dts generation sourcemaps types
Last synced: 3 months ago
JSON representation
Automatically generate your TypeScript dts types (and sourcemaps), using Bun's bundler.
- Host: GitHub
- URL: https://github.com/stacksjs/bun-plugin-dts-auto
- Owner: stacksjs
- License: mit
- Created: 2023-07-31T06:30:23.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-08-13T06:53:56.000Z (3 months ago)
- Last Synced: 2024-08-13T13:49:48.905Z (3 months ago)
- Topics: bun, bun-plugin, dts, generation, sourcemaps, types
- Language: TypeScript
- Homepage:
- Size: 1.86 MB
- Stars: 12
- Watchers: 1
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: .github/CONTRIBUTING.md
- License: LICENSE.md
- Code of conduct: .github/CODE_OF_CONDUCT.md
- Security: .github/SECURITY.md
Awesome Lists containing this project
README
![Social Card of Bun Plugin DTS Auto](./.github/art/cover.jpg)
# bun-plugin-dts-auto
[![npm version][npm-version-src]][npm-version-href]
[![GitHub Actions][github-actions-src]][github-actions-href]
[![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg)](http://commitizen.github.io/cz-cli/)
[![npm downloads][npm-downloads-src]][npm-downloads-href]This Bun plugin generates dts files for your TypeScript project.
## Features
- Automatic dts generation based on your entrypoints
- Support for source map generations
- Honors & inherits your `tsconfig.json` settings## Usage
```bash
bun install -d bun-plugin-dts-auto
```You may now use the plugin:
```ts
import dts from 'bun-plugin-dts-auto'await Bun.build({
root: './src', // optionalentrypoints: [
'src/index.ts',
],outdir: './dist',
plugins: [
dts({
cwd: import.meta.dir, // optional
rootDir: `${import.meta.dir}/src`, // optional
withSourceMap: true, // optional
outdir: 'dist/types', // optional
}),
],
})console.log('Build complete β ')
```> [!NOTE]
> Please note, this plugin honors your `tsconfig.json` `compilerOptions.outDir` setting. If you want to override this, you can do so by setting the `outdir`, `rootDir`, and `cwd` option in the build object.## Testing
```bash
bun test
```## Changelog
Please see our [releases](https://github.com/stacksjs/bun-plugin-dts-auto/releases) page for more information on what has changed recently.
## Contributing
Please review the [Contributing Guide](https://github.com/stacksjs/contributing) for details.
## Community
For help, discussion about best practices, or any other conversation that would benefit from being searchable:
[Discussions on GitHub](https://github.com/stacksjs/stacks/discussions)
For casual chit-chat with others using this package:
[Join the Stacks Discord Server](https://discord.gg/stacksjs)
## Postcardware
You will always be free to use any of the Stacks OSS software. We would also love to see which parts of the world Stacks ends up in. _Receiving postcards makes us happyβand we will publish them on our website._
Our address: Stacks.js, 5710 Crescent Park #107, Playa Vista 90094, CA.
## Sponsors
We would like to extend our thanks to the following sponsors for funding Stacks development. If you are interested in becoming a sponsor, please reach out to us.
- [JetBrains](https://www.jetbrains.com/)
- [The Solana Foundation](https://solana.com/)## Credits
Many thanks to the following core technologies & people who have contributed to this package:
- [Chris Breuer](https://github.com/chrisbbreuer)
- [All Contributors](../../contributors)## License
The MIT License (MIT). Please see [LICENSE](https://github.com/stacksjs/bun-plugin-dts-auto/tree/main/LICENSE.md) for more information.
Made with π
[npm-version-src]:
[npm-version-href]:
[npm-downloads-src]:
[npm-downloads-href]:
[github-actions-src]:
[github-actions-href]: