Development
This document covers the tools, processes, and standards that we follow went developing within the vis
repository.
Development Servers
Section titled “Development Servers”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:
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.
Tooling
Section titled “Tooling”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.
Bundling
Section titled “Bundling”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:
pnpm run build
Linter/Formatting
Section titled “Linter/Formatting”We use Biome for linting and formatting.
To run the linter, use the following command:
pnpm run lint
To run the formatter, use the following command:
pnpm run fmt
You can also run the linter and formatter at the same time to see if there are issues (without fixing them):
pnpm run checks
And you can auto-apply simple fixes to both lints and formatting with the following:
pnpm run checks:fix
Testing
Section titled “Testing”We use Vitest for testing.
To run the tests, use the following command:
pnpm run test
Test Coverage
Section titled “Test Coverage”We use Istanbul for test coverage.
To check coverage, use the following command:
pnpm run coverage
This will output coverage information to the CLI and also generate an HTML report in the coverage
directory.
Documentation and Example Site
Section titled “Documentation and Example Site”We use Starlight for documentation and example site generation.
To run the documentation site, use the following command from the site
directory:
pnpm run dev