0.1.73 • Published 3 years ago

design-system-cd v0.1.73

Weekly downloads
-
License
MIT
Repository
github
Last release
3 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

3 years ago

0.1.70

3 years ago

0.1.71

3 years ago

0.1.72

3 years ago

0.1.69

3 years ago

0.1.67

3 years ago

0.1.68

3 years ago

0.1.66

3 years ago

0.1.63

3 years ago

0.1.64

3 years ago

0.1.65

3 years ago

0.1.62

3 years ago

0.1.61

3 years ago

0.1.60

3 years ago

0.1.59

3 years ago

0.1.58

3 years ago

0.1.57

3 years ago

0.1.56

3 years ago

0.1.54

3 years ago

0.1.55

3 years ago

0.1.52

3 years ago

0.1.53

3 years ago

0.1.50

3 years ago

0.1.51

3 years ago

0.1.49

3 years ago

0.1.41

3 years ago

0.1.42

3 years ago

0.1.43

3 years ago

0.1.44

3 years ago

0.1.45

3 years ago

0.1.46

3 years ago

0.1.47

3 years ago

0.1.48

3 years ago

0.1.40

3 years ago

0.1.38

3 years ago

0.1.39

3 years ago

0.1.30

3 years ago

0.1.31

3 years ago

0.1.32

3 years ago

0.1.33

3 years ago

0.1.34

3 years ago

0.1.35

3 years ago

0.1.36

3 years ago

0.1.37

3 years ago

0.1.27

3 years ago

0.1.28

3 years ago

0.1.29

3 years ago

0.1.20

3 years ago

0.1.21

3 years ago

0.1.22

3 years ago

0.1.23

3 years ago

0.1.24

3 years ago

0.1.25

3 years ago

0.1.26

3 years ago

0.1.19

3 years ago

0.1.17

3 years ago

0.1.18

3 years ago

0.1.16

3 years ago

0.1.13

3 years ago

0.1.14

3 years ago

0.1.15

3 years ago

0.1.12

3 years ago

0.1.11

3 years ago

0.1.10

3 years ago

0.1.8

3 years ago

0.1.7

3 years ago

0.1.9

3 years ago

0.1.6

3 years ago

0.1.5

3 years ago

0.1.4

3 years ago

0.1.3

3 years ago

0.1.2

3 years ago

0.1.1

3 years ago

0.1.0

3 years ago