Skip to content

Latest commit

 

History

History
61 lines (38 loc) · 1.98 KB

File metadata and controls

61 lines (38 loc) · 1.98 KB

Contributing

Welcome!

We're excited for your interest in WCC, and maybe even your contribution!

Setup

To develop for the project, you'll want to follow these steps:

  1. Clone the repository
  2. Have NodeJS LTS installed and / or use nvm (see below)
  3. Run npm ci
  4. Run npx patch-package
  5. Run npx playwright install

NVM

If you have NVM (Node Version Manager) installed, get the recommend node version:

And then running nvm use

$ nvm use

Local Development

The local development workflows for WCC are:

  • npm test - Run all the tests
  • npm test:tdd - Run all the tests in watch mode
  • npm run lint - Run all linters
  • npm run check:types - Run tsc to validate TypeScript types
  • npm run format - Auto-format all file

Website

The website is built with Greenwood. To run the website locally, use one of the following commands:

  • npm run docs:dev - Start the dev server
  • npm run docs:build - Generate a production build
  • npm 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 Vitest
  • npm run test:docs:tdd - Run the test suite with Vitest in watch mode

Sandbox

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/.

Playground

The website also hosts a Playground (REPL) for seeing WCC output in the browser in real time. Development happens in this repo.