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 devThis 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 buildLinter/Formatting
Section titled “Linter/Formatting”We use Biome for linting and formatting.
To run the linter, use the following command:
pnpm run lintTo run the formatter, use the following command:
pnpm run fmtYou can also run the linter and formatter at the same time to see if there are issues (without fixing them):
pnpm run checksAnd you can auto-apply simple fixes to both lints and formatting with the following:
pnpm run checks:fixTesting
Section titled “Testing”We use Vitest for testing.
To run the tests, use the following command:
pnpm run testTest Coverage
Section titled “Test Coverage”We use Istanbul for test coverage.
To check coverage, use the following command:
pnpm run coverageThis 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