Skip to content

Development

This document covers the tools, processes, and standards that we follow went developing within the vis repository.

To get started developing in the vis repsitory, you can use the following command to watch for changes in all packages and the documentation site:

Terminal window
pnpm run dev

This will use the Parcel watch command to detect changes in each package and the Starlight development server in parallel in one console.

If you’d rather run individual commands in multiple terminals, you can always use pnpm run dev in each individual package folder or the site folder for the docs website.

These tools will mostly be found in the packages directory. Each example will have its own needs and may not necessarily use all of these tools.

We use Parcel to bundle our libraries. You can produce a builds of all our packages suitable for upload to a JavaScript package repository by running the following command from the root directory or inside each packages folder:

Terminal window
pnpm run build

We use Biome for linting and formatting.

To run the linter, use the following command:

Terminal window
pnpm run lint

To run the formatter, use the following command:

Terminal window
pnpm run fmt

You can also run the linter and formatter at the same time to see if there are issues (without fixing them):

Terminal window
pnpm run checks

And you can auto-apply simple fixes to both lints and formatting with the following:

Terminal window
pnpm run checks:fix

We use Vitest for testing.

To run the tests, use the following command:

Terminal window
pnpm run test

We use Istanbul for test coverage.

To check coverage, use the following command:

Terminal window
pnpm run coverage

This will output coverage information to the CLI and also generate an HTML report in the coverage directory.

We use Starlight for documentation and example site generation.

To run the documentation site, use the following command from the site directory:

Terminal window
pnpm run dev