Package detail

@guoyunhe/bundle-dts

guoyunhe11GPL-3.01.1.1

Compile TypeScript declarations (*.d.ts) and bundle into a single file

typescript, tsc, types, declaration

readme

@guoyunhe/bundle-dts

Install

npm i @guoyunhe/bundle-dts

Usage

import { bundleDts } from '@guoyunhe/bundle-dts';

bundleDts();

By default, it scans src and bundles src/index.ts into dist/index.d.ts.

Options

entry: string

Default: src/index.ts.

The entry point TypeScript file.

bundleDts({ entry: 'src/main.ts' });

outFile: string

Default: dist/index.d.ts

The path of output declaration file.

bundleDts({ outFile: 'out/main.d.ts' });

changelog

Changelog

1.1.1 - 2023-03-03

  • Fixed default exclude patterns

1.1.0 - 2023-02-12

  • Skip bundle when here is only one file
  • Make options optional

1.0.1 - 2023-02-11

  • Fixed bundle issue caused by temp directory

1.0.0 - 2023-01-30

  • Added bundleDts() function with tsconfigFilePath, entry, include, exclude and outFile options