A template for TypeScript projects. It works well both for final applications and class libraries.
Import /~/typescript-webpack-boilerplate/dist/index.js
.
The library will be under the TWB namespace.
Import with require('typescript-webpack-boilerplate')
.
It is highly recommended to create a definitions file so others can work with the library, if possible, hosting it at DefinitelyTyped repository would be the best.
Remember to update the barrel app/Index.ts if you want to export new functionalities. Also, you will need to update the type definitions.
npm run setup
: run this command to install typings.npm start
: run the default dev task.npm run build
: build TypeScript sources and UMD distributable.npm test
: run all tests.npm run test:unit
: run unit tests only.npm run test:coverage
: run coverage tests.
The coverage reports can be found under test/results/coverage
.
You will need to add the plugin SonarTsPlugin.