Something went wrong. Try again.
[READ-ONLY] Mirror of https://github.com/sxzz/rolldown-plugin-dts. A Rolldown plugin to generate and bundle dts files.
Something went wrong. Try again.
1234567891011121314151617181920212223242526272829303132import { createDebug } from 'obug'import { createDtsInputPlugin } from './dts-input.ts'import { createFakeJsPlugin } from './fake-js.ts'import { createGeneratePlugin } from './generate.ts'import { resolveOptions, type Options } from './options.ts'import { createDtsResolvePlugin } from './resolver.ts'import type { Plugin } from 'rolldown'
const debug = createDebug('rolldown-plugin-dts:options')
export function dts(options: Options = {}): Plugin[] { debug('resolving dts options') const resolved = resolveOptions(options) debug('resolved dts options %o', resolved)
const plugins: Plugin[] = [] if (options.dtsInput) { plugins.push(createDtsInputPlugin(resolved)) } else { plugins.push(createGeneratePlugin(resolved)) } plugins.push(createDtsResolvePlugin(resolved), createFakeJsPlugin(resolved)) return plugins}
export { createFakeJsPlugin, createGeneratePlugin, resolveOptions, type Options,}