/typescript-library-template

Example repo for how to set up a typescritpt library with an example demo app that also uses webpack

Primary LanguageJavaScriptMIT LicenseMIT

Typescript Library Template

A small template repo for a typescript library that also has an inlcuded demo app that consumes from the library. Webpack is used to bundle, build and serve.


Running the demo app

Firstly you need to install the dependencies using the following command (in both library and library demo directories):

npm install

You can build and watch changes to the library using the following command in the library directory:

npm run build:watch

Link the library to the demo app using the following command in the library demo directory:

npm run link:library

You can serve the demo app and watch for changes using the following command in the library demo directory:

npm run serve:

to build and output the demo app dist/ use the following command in the library demo directory:

npm run build

Tests have been setup using web test runner, you can run the tests using the following command in the library directory:

npm run test