GithubHelp home page GithubHelp logo

isabella232 / paste Goto Github PK

View Code? Open in Web Editor NEW

This project forked from twilio-labs/paste

0.0 0.0 0.0 115.03 MB

Paste is a design system for designing and building consistent experiences at Twilio.

Home Page: https://paste.twilio.design

License: MIT License

JavaScript 5.72% HTML 4.37% TypeScript 89.76% Shell 0.03% Handlebars 0.12%

paste's Introduction

Paste

Paste is a design system used to build accessible, consistent, and high quality customer experiences at Twilio. Paste is open source and contributions are welcome.

Code of Conduct PRs Welcome


Usage

For usage guidelines, please see our documentation website.

Developing on Paste

Getting started

Clone the repo then run the following commands from within the repo's folder:

yarn # bootstraps the repo and downloads packages
yarn build # builds all of Paste

Then you can run a local storybook instance with:

yarn start:storybook

For more commands, please reference the package.json file.

Contributing

Before contributing, please make sure that you read our Contributing Guidelines and agree with our Code of Conduct.

Changesets

Each change to a package must come with a changeset. You should have an individual changeset for each package you have touched.

To create a changeset you can run:

yarn changeset

Follow the prompts shown to you in your terminal.

Instructions on how to use the cli tool can be found here, but all you should need to do is generate a changeset and commit it with your Pull Request.

Hosted Storybook

Storybook

We use Chromatic to host the Storybook instance.

Dependencies

Paste is a monorepo and has some specific requirements in how it handles dependencies.

Dev Deps

Each package can have dev dep requirements, such as typescript. As this is a monorepo using yarn workspaces there is no requirement to list these as package dev deps. All dev deps are hoisted to the monorepo root. Declare them at the root package.json file.

Peer Deps

A special note about peer deps: Peer dependencies should be hoisted up the dependency tree. If package-a lists package-b as a peer dep, and package-b lists package-c as a peer dep, package-c must also be listed as a peer dep for package-a. All the way down the tree.

A real example might be a Button. Button may only have a peer dependency on Box, but Box has a peer dependency on Theme, Design-Tokens, and Style-Props. These child peer deps need to be hoisted to the Button package. As such Button deps should look like:

{
  "name": "button",
  "peerDependencies": {
    "@twilio-paste/box": "^0.0.1",
    "@twilio-paste/theme": "^0.0.1",
    "@twilio-paste/design-tokens": "^0.0.1",
    "@twilio-paste/style-props": "^0.0.1"
  }
}

Internal Deps

When a package has a peer dependency on another internal package in the mono repo, it must also be listed as a dev dependency for compilation.

Example:

{
  "name": "button",
  "peerDependencies": {
    "react": "^16.8.6",
    "react-dom": "^16.8.6"
    "@twilio-paste/box": "^0.0.1",
    "@twilio-paste/theme": "^0.0.1",
    "@twilio-paste/design-tokens": "^0.0.1",
    "@twilio-paste/style-props": "^0.0.1"
  },
  "devDependencies": {
    "@twilio-paste/box": "^0.0.1",
    "@twilio-paste/theme": "^0.0.1",
    "@twilio-paste/design-tokens": "^0.0.1",
    "@twilio-paste/style-props": "^0.0.1"
  }
}

Releasing

Releasing Paste happens via CI/CD using Changesets.

License

MIT

paste's People

Contributors

aayushpi avatar andioneto avatar cjcodes avatar corinne-nagel avatar ctecks avatar dependabot-preview[bot] avatar giantrobots avatar github-actions[bot] avatar gloriliale avatar henrieri avatar itsmewiththeface avatar jsheppard-twilio avatar kateschwarz avatar katieporter avatar loreina avatar m-shykula avatar nkrantz avatar richbachman avatar salimbensiali avatar serifluous avatar sgbj avatar sidhyatikku avatar sitaggart avatar snyk-bot avatar synnottd avatar thesisb avatar twilio-product-security avatar twiliopastebot avatar two24studios avatar vankhoawin avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.