Skip to content

Latest commit

 

History

History
40 lines (26 loc) · 1.51 KB

README.md

File metadata and controls

40 lines (26 loc) · 1.51 KB

Typescript, Rollup & Jest Starter

Starter project for building typescript projects using Rollup and Jest.

Features

  • Statically typed build system for working with Typescript.
  • Consistent code style with TSLint.
  • Dead code elimination
  • Rollup for bundling
  • Jest for unit testing and code coverage
  • JSDOM for DOM based testing
  • Flexible build configuration using environment variables
  • Rapid development with automatic javascript building and browser hot reloading
  • Easy debugging via VSCode integration

Scripts

  • build - Builds the minified production bundle along with typescript modules
  • serve - Builds the development bundle, creates a local server and watches for changes
  • test - Run the linting and unit tests (including code coverage report)

VS Code Integration

Tasks

Access the task list using shift+command+b (ctrl+shift+b in Windows) to run any of the above scripts.

Debugging

Unit tests can be debugged from within VS Code by placing a break point within your code and then launching the debugger.

  • Jest - All - Runs all unit tests in debug mode
  • Jest - Current - Runs the currently visible within VS Code editor

Coverage reports

The coverage reports are generated with Jest, and output to the /coverage folder.

To view the html report open: coverage/lcov-report/index.html