Last update on July/2020
This is a template project for a client TypeScript library creation.
It sets up:
- Webpack development environment
- Webpack bundle
- Mocha tests with Istanbul for coverage reports
- ESLint for TypeScript
- Prettier
- Demo page
This setup assumes you're using VSCode as editor. Get the most of it by installing ESLint and Prettier extensions.
Run:
$ npm install
Get a local server on http://localhost:3000
with hot reload pointing to your demo page:
$ npm run start
Run tests in tests/**/*.spec.ts
and generate coverage report:
$ npm run test
Bundle your library into dist/mylib.js
:
$ npm run bundle
- Set up scripts to publish NPM package
- Set up scripts to deploy demo page on GHPages
- Set up SASS for demo page