Typescript based boilerplate for developing javascript library in typescript. This lets you write your codes in typescript to take advantage of the language features and in the end build the library that can be accessed/used in following ways;
-
ES2015 module. i.e.
import <somethingFromLibrary> from 'libraryName'
-
CommonJS module. i.e.
require('libraryName')
-
Global variable when included through
script
tag
Run npm install
to install all necessary packages to start the library
Run npm run build
to build the library. Build artifacts will be stored in the dist/
directory.
Run npm test
to execute the unit test, this starter is configured with jest
Run npm run docs
to generate your library documentations. Documentation pages will be store in docs/
directory.