0.1.73 • Published 4 years ago

design-system-cd v0.1.73

Weekly downloads
-
License
MIT
Repository
github
Last release
4 years ago

CoinDesk Design System (Storybook)

Local setup

  1. Clone repo
git clone
  1. CD into the root of the repo and run:
yarn or npm install
  1. At the root of the project create .env file with two values:
NPM_TOKEN=<ALEX HAS TOKEN>
GH_TOKEN=<ALEX HAS TOKEN>
  1. To start local development run:
yarn storybook

and navigate to http://localhost:6006/

##Project structure

To have a better understanding of how everything works please look at docs here: Storybook

  • .storybook folder controls global setting: main.js it's like a project config and preview.js has global styles settings the public folder has some root files (Similar to how react-create-app works)

  • .github folder used to set up CI/CD with Netlify and Chromatic

  • src -> the most important folder where you add and modify files:
    • src/shared includes global styles to reuse within components (for example fonts, global styles, etc)
    • src/stories appear on the deployed side on the left rail in the "Example section" and can be re-worked
    • src/ -> all components under src folder are the most important, that what we include in the NPM package published to npmjs

Note: You can change this structure and move elements into separate folders from src, but keep imports in the main entry point which is src/index.js

Important: All files with .js extension is what we export to and NPM package, all files with .stories.js extension is what you see in the storybook portal

import * as styles from './shared/styles';
import * as global from './shared/global';
import * as animation from './shared/animation';
import * as icons from './shared/icons';

export { styles, global, animation, icons };

export * from './Avatar';
export * from './Badge';
export * from './Button';
export * from './Icon';
export * from './Link';

Branching strategy

If you want to create a new component or modify something:

  1. Create a separate branch from the "main"
  2. Add code changes, commit, push to a separate branch and create a pull request
  3. Navigate to a pull request and you should see something like that in the UI

Before merging approve a new PR's in the Chromatic UI

Once you merge PR to the main branch it will automatically update deployed Storybook portal here: https://coindesk-design-system.netlify.app/?path=/story/example-introduction--page

And publish a new NPM package version to npmjs: https://www.npmjs.com/package/design-system-cd

To use a correct version in the application run

npm install design-system-cd

To always use the latest version use @latest in the package.json of your application:

   "design-system-cd": "@latest"
0.1.73

4 years ago

0.1.70

4 years ago

0.1.71

4 years ago

0.1.72

4 years ago

0.1.69

4 years ago

0.1.67

4 years ago

0.1.68

4 years ago

0.1.66

4 years ago

0.1.63

4 years ago

0.1.64

4 years ago

0.1.65

4 years ago

0.1.62

4 years ago

0.1.61

4 years ago

0.1.60

4 years ago

0.1.59

4 years ago

0.1.58

4 years ago

0.1.57

4 years ago

0.1.56

4 years ago

0.1.54

4 years ago

0.1.55

4 years ago

0.1.52

4 years ago

0.1.53

4 years ago

0.1.50

4 years ago

0.1.51

4 years ago

0.1.49

4 years ago

0.1.41

4 years ago

0.1.42

4 years ago

0.1.43

4 years ago

0.1.44

4 years ago

0.1.45

4 years ago

0.1.46

4 years ago

0.1.47

4 years ago

0.1.48

4 years ago

0.1.40

4 years ago

0.1.38

4 years ago

0.1.39

4 years ago

0.1.30

4 years ago

0.1.31

4 years ago

0.1.32

4 years ago

0.1.33

4 years ago

0.1.34

4 years ago

0.1.35

4 years ago

0.1.36

4 years ago

0.1.37

4 years ago

0.1.27

4 years ago

0.1.28

4 years ago

0.1.29

4 years ago

0.1.20

4 years ago

0.1.21

4 years ago

0.1.22

4 years ago

0.1.23

4 years ago

0.1.24

4 years ago

0.1.25

4 years ago

0.1.26

4 years ago

0.1.19

4 years ago

0.1.17

4 years ago

0.1.18

4 years ago

0.1.16

4 years ago

0.1.13

4 years ago

0.1.14

4 years ago

0.1.15

4 years ago

0.1.12

4 years ago

0.1.11

4 years ago

0.1.10

4 years ago

0.1.8

4 years ago

0.1.7

4 years ago

0.1.9

4 years ago

0.1.6

4 years ago

0.1.5

4 years ago

0.1.4

4 years ago

0.1.3

4 years ago

0.1.2

4 years ago

0.1.1

4 years ago

0.1.0

4 years ago