GithubHelp home page GithubHelp logo

ndelangen / design-system Goto Github PK

View Code? Open in Web Editor NEW

This project forked from securityscorecard/design-system

0.0 0.0 0.0 536.57 MB

Home Page: https://securityscorecard.github.io/design-system/

License: Apache License 2.0

Shell 0.12% JavaScript 0.81% TypeScript 92.82% CSS 0.06% HTML 0.36% Dockerfile 0.04% MDX 5.80%

design-system's Introduction

Design System

Usage

You can install this package as:

yarn add @securityscorecard/design-system
# OR
npm install @securityscorecard/design-system

Local Development

Development in Storybook

git clone https://github.com/securityscorecard/design-system
cd design-system
yarn
yarn run storybook

Development in third-party application

To avoid version conflicts within the application we need to link reactreact-dom  and styled-components libraries from the third-party application into design-system.

cd path/to/application
cd node_modules/react && yarn link # register react
cd ../react-dom && yarn link # register react-dom
cd ../styled-components && yarn link # register styled-components

Then we need to use registered packages in design-system, register package as the link and start build script.

cd path/to/design-system
yarn link react && yarn link react-dom && yarn link styled-components # use registered package
yarn link # register design-system
yarn build --watch # start build in watch mode

At the end, we need to link design-system in a third-party application.

cd path/to/application
yarn link @securityscorecard/design-system # use design-system

PNP with Yarn2

This package is using Yarn2 with Plug'n'play installation. That means you won't see any node_modules folder in the root. If you already workded in this repository we recommend to you first remove the original node_modules folder and then run yarn to create Yarn cache. We do not expect any significant issues but if anything goes wrong feel free to reach to us or check the Troubleshooting section below.

Troubleshooting

Cannot find module

This is usually caused by not using patched version of typescript package. If you are using VS Code please follow these steps:

  1. Press cmd+shift+p in a TypeScript file
  2. Choose "Select TypeScript Version"
  3. Pick "Use Workspace Version"
  4. Restart VS Code (if needed)

Contributing

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.