rollup-plugin-generate-declarations

1.1.2 • Public • Published

rollup-plugin-generate-declarations

Simple rollup plugin to run tsc --emitDeclarationOnly right from the rollup config.

Why?

When you're using babel to transpile typescript files you could be missing one (sometimes) pretty important thing: declaration files .d.ts. This rollup plugin will generate them for you automatically, so you don't have to run tsc --emitDeclarationOnly separately.

How?

Just install this package as devDependency with your preferred package manager:

$ npm install rollup-plugin-generate-declarations --save-dev

and place it into plugins section in your rollup.config.js file:

import generateDeclarations from 'rollup-plugin-generate-declarations';

export default {
  /* ... */
  plugins: [
    generateDeclarations()
  ]
};

Package Sidebar

Install

npm i rollup-plugin-generate-declarations

Weekly Downloads

64

Version

1.1.2

License

MIT

Unpacked Size

3.23 kB

Total Files

4

Last publish

Collaborators

  • keysh