rollup-plugin-generate-declarations
v1.1.2
Published
Simple rollup plugin to run `tsc --emitDeclarationOnly` right from the rollup config.
Downloads
1,606
Maintainers
Readme
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()
]
};