Patreon Studio Design System
npm install @patreon/studioStudio Design System is Patreon’s web design system and is built with React and Styled Components and written in Typescript.
The docs for Studio Design System live at https://studio.patreon.com
```
npm i -P @patreon/studio
View available Studio components and how to use them in the docs.
Run npm run dev and open localhost:6006 in your browser. This will start Storybook and watch for changes.
Run npm run test or npm run test:watch
#### Updating snapshots
If you make changes to a component and the snapshot test fails, you can update the snapshot by running npm run test:ci -- -u or npm run test:ci -- [file] -u for a specific snapshot file.
Happo is our tool for visual regression testing. It's integrated as part of our CircleCI tests, but can also be run locally, with a little bit of setup:
1. Open up 1Password and search for a secure note titled: "Happo .env Variables - Studio"
1. Create a .env file in the studio directory (it will be ignored by git)npm install
1. Add the .env variables from the 1Password document to the new file.
1. If you haven’t already, run to make sure dependencies are installed (dotenv in particular).npm run happo dev
1. Run , which will watch files for changes and with the --only flag can be limited to specific components. See the docs for more info.
1. Happo will run tests, then provide a url where you can see the report.
- npm install
- npm run prf:link$3
Run
npm run prf:unlink` to revert to the published version of Studio.