npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@patreon/studio

v12.29.5

Published

Patreon Studio Design System

Downloads

1,231

Readme

Studio Design System

Introduction

Studio 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

Getting Started

Installation

npm i -P @patreon/studio

How to use

View available Studio components and how to use them in the docs.

As an example, here’s how you’d import the Text component:

import { Text } from '@patreon/studio'

Docs

We use Docz to generate the Studio docs that live at https://studio.patreon.com.

How to run the docs locally

Run npm run docs:server and open localhost:3003 in your browser.

Storybook

Storybook is a component development environment. Our version of Storybook uses the component story format, which expects stories to be written in the following format.

export ExampleStory = () => <ExampleComponent />

How to run Storybook locally

Run npm run storybook.

Tests

How to run tests

Run npm run test or npm run test:watch

How to use Happo locally

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"
  2. Create a .env file in the studio directory (it will be ignored by git)
  3. Add the .env variables from the 1Password document to the new file.
  4. If you haven’t already, run npm install to make sure dependencies are installed (dotenv in particular).
  5. Run npm run happo dev, which will watch files for changes and with the --only flag can be limited to specific components. See the docs for more info.
  6. Happo will run tests, then provide a url where you can see the report.

Developing in PRF

If you haven't done it, checkout studio into a sibling directory of PRF and then run devx sync.

From within a devx attach session, go to /opt/code/studio and run npm install and then run npm run prf:link to link your local dev version of studio to PRF. This script will also watch for changes and rebuild as needed. Each rebuild isn't particularly fast, so it's recommended you watch the console output to know when it's safe to reload your dev browser. See npm run prf:link -- --help for more info.

rdev instructions

You can develop in Studio and PRF similarly in rdev. If you don't already have a PRF container in rdev, create one:

  • rdev new patreon_react_features --name prf Open an SSH session to your container:
  • rdev ssh prf

Inside your container, install Studio in the home directory

Run the same instructions as above:

  • cd studio
  • npm install
  • npm run prf:link

Clean up when done

Run npm run prf:unlink to revert to the published version of Studio.