Hello! Thank you for considering contributing to Preview.js :)
This contributing guide is quite rudimentary at the moment, feel free to suggest improvements.
Before you start, please review the Contributor Assignment Agreement. You will need to sign it before your PR can be merged.
This is a monorepo managed by pnpm using Turborepo to manage builds:
- Ensure you have
pnpm
installed. - Run
pnpm i
from the root. - Build all packages by running
pnpm turbo build
.
Unit tests are run with Vitest whereas end-to-end tests are run with Playwright.
You can run all unit tests across the monorepo with pnpm turbo test
, or you can run tests for a given package with pnpm test
from its directory.
Each framework plugin has its own end-to-end tests, which can be run with pnpm e2e-test
.
In Visual Studio Code, hit F5
or click
Note that the OSS implementation of Preview.js is a simpler webview than the official packaged extension.