We're excited for your interest in WCC, and maybe even your contribution!
To develop for the project, you'll want to follow these steps:
- Clone the repository
- Have NodeJS LTS installed and / or use
nvm(see below) - Run
npm ci - Run
npx patch-package - Run
npx playwright install
If you have NVM (Node Version Manager) installed, get the recommend node version:
- Windows: NVM for Windows
- Linux/MacOS: Node Version Manager
And then running nvm use
$ nvm useThe local development workflows for WCC are:
npm test- Run all the testsnpm test:tdd- Run all the tests in watch modenpm run lint- Run all lintersnpm run check:types- Runtscto validate TypeScript typesnpm run format- Auto-format all file
The website is built with Greenwood. To run the website locally, use one of the following commands:
npm run docs:dev- Start the dev servernpm run docs:build- Generate a production buildnpm run docs:serve- Serve a production build
To run tests for the website, first make sure you have at least run npm run docs:build, then:
npm run test:docs- Run a single suite of tests with Vitestnpm run test:docs:tdd- Run the test suite with Vitest in watch mode
To assist in local development of WCC, there is a "sandbox" app built into the website, that can be used to validate a number of examples in the browser. (think of it as a storybook for WCC).
After starting the dev server, visit the /sandbox/ route in your browser. All code for the examples are in ./docs/components/sandbox/.
The website also hosts a Playground (REPL) for seeing WCC output in the browser in real time. Development happens in this repo.