This starter includes a watch task which makes development faster and more interactive. It's particularly helpful for TDD/BDD workflows.
To start working, install Yarn and run:
yarn watch
To generate and view test coverage, run:
yarn cov
This will create an HTML report of test coverage – source-mapped back to Typescript – and open it in your default browser.
The src folder is analyzed and documentation is automatically generated using typedoc.
yarn docs
This command generates API documentation for your library in HTML format.
Since types are tracked by Typescript, there's no need to indicate types in JSDoc format. For more information, see the typedoc documentation.
For more advanced documentation generation, you can provide your own typedoc theme, or build your own documentation using the JSON typedoc export:
yarn docs:json
This project is tooled for Conventional Changelog to make managing releases easier. See the standard-version documentation for more information on the workflow, or CHANGELOG.md
for an example.
# bump package.json version, update CHANGELOG.md, git tag the release
yarn release
# Release without bumping package.json version
yarn release -- --first-release
# PGP sign the release
yarn release -- --sign
You can run the info
script for information on each available package script.
yarn run info
info:
Display information about the scripts
build:
(Trash and re)build the library
lint:
Lint all typescript source files
unit:
Run unit tests
test:
Lint and test the library
watch:
Watch source files, rebuild library on changes, rerun relevant tests
watch:build:
Watch source files, rebuild library on changes
watch:unit:
Watch the build, rerun relevant tests on changes
cov:
Run tests, generate the HTML coverage report, and open it in a browser
html-coverage:
Output HTML test coverage report
send-coverage:
Output lcov test coverage report and send it to codecov
docs:
Generate API documentation and open it in a browser
docs:json:
Generate API documentation in typedoc JSON format
release:
Bump package.json version, update CHANGELOG.md, tag a release