How to use the rollup-plugin-dts function in rollup-plugin-dts

To help you get started, we’ve selected a few rollup-plugin-dts examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github pikapkg / builders / packages / plugin-bundle-types / src / index.ts View on Github external
export async function build({out, options, reporter}: BuilderOptions): Promise {
  const readFromTypes = path.join(out, 'dist-types', 'index.d.ts');
  const writeToTypes = path.join(out, 'dist-types');
  const writeToTypesBundled = path.join(writeToTypes, 'index.d.ts');
  const result = await rollup({
    input: readFromTypes,
    plugins: [rollupPluginDts()],
  });
  rimraf.sync(writeToTypes);
  await result.write({
    file: writeToTypesBundled,
    format: 'esm',
  });
  reporter.created(writeToTypesBundled);
}
github pikapkg / builders / packages / plugin-bundle-types / pkg / dist-src / index.js View on Github external
export async function build({ out, options, reporter }) {
    const readFromTypes = path.join(out, 'dist-types', 'index.d.ts');
    const writeToTypes = path.join(out, 'dist-types');
    const writeToTypesBundled = path.join(writeToTypes, 'index.d.ts');
    const result = await rollup({
        input: readFromTypes,
        plugins: [rollupPluginDts()],
    });
    rimraf.sync(writeToTypes);
    await result.write({
        file: writeToTypesBundled,
        format: 'esm',
    });
    reporter.created(writeToTypesBundled);
}

rollup-plugin-dts

A rollup plugin that will bundle up your .d.ts definition files.

LGPL-3.0
Latest version published 7 months ago

Package Health Score

76 / 100
Full package analysis

Popular rollup-plugin-dts functions