How to use dts-bundle-generator - 1 common examples

To help you get started, we’ve selected a few dts-bundle-generator 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 ionic-team / stencil / scripts / utils / bundle-dts.ts View on Github external
export async function bundleDts(opts: BuildOptions, inputFile: string) {
  const cachedDtsOutput = inputFile + '-bundled.d.ts';

  if (!opts.isProd) {
    try {
      return await fs.readFile(cachedDtsOutput, 'utf8');
    } catch (e) {}
  }

  const entries = [{
    filePath: inputFile
  }];

  let outputCode = generateDtsBundle(entries).join('\n');

  outputCode = cleanDts(outputCode);

  await fs.writeFile(cachedDtsOutput, outputCode);

  return outputCode;
}

dts-bundle-generator

DTS Bundle Generator

MIT
Latest version published 19 hours ago

Package Health Score

80 / 100
Full package analysis

Popular dts-bundle-generator functions

Similar packages