The ts-lib-builder
package is designed to simplify the build process for your TypeScript libraries and APIs. It combines the essential steps of compilation and minification into a single, efficient workflow.
Install the package:
$ npm install -D ts-lib-builder
Include it in your build
script:
{
...
"scripts": {
"start": "ts-lib-builder --tsconfig=tsconfig.build.json",
...
}
...
}
Generate an optimized production-grade build:
$ npm start
- TypeScript
- ...
Install dependencies:
$ npm install
Build the library:
$ npm start
Publish to npm
:
$ npm publish