bun-plugin-dts-auto
TypeScript icon, indicating that this package has built-in type declarations

0.11.1 • Public • Published

Social Card of Bun Plugin DTS Auto

bun-plugin-dts-auto

npm version GitHub Actions Commitizen friendly npm downloads

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

bun install -d bun-plugin-dts-auto

You may now use the plugin:

import dts from 'bun-plugin-dts-auto'

await Bun.build({
  root: './src', // optional

  entrypoints: [
    '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

bun test

Changelog

Please see our releases page for more information on what has changed recently.

Contributing

Please review the Contributing Guide for details.

Community

For help, discussion about best practices, or any other conversation that would benefit from being searchable:

Discussions on GitHub

For casual chit-chat with others using this package:

Join the Stacks Discord Server

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.

Credits

Many thanks to the following core technologies & people who have contributed to this package:

License

The MIT License (MIT). Please see LICENSE for more information.

Made with 💙

Package Sidebar

Install

npm i bun-plugin-dts-auto

Weekly Downloads

122

Version

0.11.1

License

MIT

Unpacked Size

8.59 MB

Total Files

6

Last publish

Collaborators

  • chrisbreuer