These scripts are run via the package.json scripts.
| Script | package.json |
About |
|---|---|---|
| clean | clean |
Clean generated files |
| lint | lint |
Runs ESlint/Prettier. |
| lint-fix | lint:fix |
Runs ESlint/Prettier with autofix. |
| lint-clean | lint:clean |
Runs ESlint/Prettier with no caching. |
| extract-inline-examples | extract:inline:examples |
Extracts inline examples from source code into examples/inline |
| test-run | test |
Runs project unit tests. |
| test-watch | test:watch |
Runs project unit tests in watch mode. |
| test-project-examples | test:project:examples |
Runs snapshot tests on project examples. |
| test-markdown-examples | test:markdown:examples |
Runs snapshot tests on markdown examples. |
| test-inline-examples | test:inline:examples |
Tests inline examples after first extracting them to disk by running extract:inline:examples. |
| test-examples | test:examples |
Tests project, markdown, and inline examples. |
| coverage | coverage |
Runs project unit tests with coverage. |
| typecheck | typecheck |
Type checking of all sources, including project, markdown, and inline examples, using tsc. |
| circular | circular |
Circular dependencies check. |
| run-example | run:example |
Runs the given example name, for example pnpm run:example draw. Run with no arguments to show all example names. |
| build:docs | build:docs |
Runs Typedoc to generate API documentation into api-docs/. |
| check | check |
Runs everything that could expose issues in parallel using a single command. Will run all of: 1.circular, 2.test:examples, 3.coverage, 4.build, 6.lint:fix, and 7.build:docs. |
| build | build |
Runs tsc on sources and copies package.json into dist. |
| publish | publish |
Runs check then publishes docs and library. |