Storybook 환경구축

딱이·2021년 4월 1일
0
post-thumbnail

설치하기

## Create our application:
$ npx create-react-app [프로젝트명]
$ cd [프로젝트 폴더]

## Add Storybook:
$ npx -p @storybook/cli sb init

Run App

## Run the test runner (Jest) in a terminal:
yarn test --watchAll

## Start storybook on port 6006:
yarn storybook

## Run app on port 3000:
yarn start

확인해 볼까요?

Storybook이 실행되었습니다. 이제 컴포넌트 만들기 시작!


CSS

degit을 사용해 font를 다운로드 했습니다. degit을 사용하면, Github에 있는 파일과 폴더를 간단하고 쉽게 다운받을 수 있다는 장점이 있습니다.

npx degit chromaui/learnstorybook-code/src/assets/font src/assets/font
npx degit chromaui/learnstorybook-code/src/assets/icon src/assets/icon

참고 | https://github.com/chromaui/learnstorybook-code/tree/master/src/assets

profile
뚝딱뚝딱 FE

0개의 댓글