ํ์ฌ Storybook์ ์ฌ์ฉํ์ฌ ์ปดํฌ๋ํธ ๋ฌธ์ํ๋ฅผ ํ๊ณ ์๋๋ฐ, ๋ค๋ฅธ ํ์๋ค์๊ฒ ๊ณต์ ๊ฐ ๋์ด์ผ ํ๋ ์ํฉ์ด๋ฏ๋ก ๊ฐ๋จํ๊ฒ ๋ฐฐํฌํ ์๋ ์์๊น ํ๋ค๊ฐ chromatic์ด๋ netlify๋ฅผ ์ฌ์ฉํ๋ฉด ๋ ๊ฐ๋จํ๊ฒ ๋ฐฐํฌ๊ฐ๋ฅํ๋ค๊ณ ํ์ฌ ์์ ํ์๋ค.
์คํ ๋ฆฌ๋ถ ๊ณต์๋ฌธ์์๋ chromatic์ ์ฌ์ฉํ ๋ฐฐํฌ ๋ฐฉ๋ฒ์ ์๋ดํ๊ณ ์๋ค.
https://storybook.js.org/tutorials/intro-to-storybook/react/ko/deploy/
Storybook Tutorials
Learn how to build and test UI components with Storybook. Our in-depth frontend guides are created by Storybook maintainers and peer-reviewed by the open source community.
storybook.js.org
yarn add -D chromatic
์ค์นํ๊ณ chromatic ๋ค์ด๊ฐ์ ๋ก๊ทธ์ธํ๋ฉด ์๋์ ๊ฐ์ด ๋ณด์ธ๋ค.
๊นํ๋ธ repo๋ ์ฐ๋๋ ๊ฐ๋ฅํ๊ณ create a project ๋๋ฅด๋ฉด ๊นํ๋ธ ๋ ํฌ ์์ด๋ ์คํ ๋ฆฌ๋ถ ๋ฐฐํฌ๊ฐ ๊ฐ๋ฅํ๋ค.

add project๊ฐ ์๋ฃ๋๋ฉด ์๋์ ๊ฐ์ด ํ ํฐ์ด ์ถ๊ฐ๋์ด ๋์ค๋๋ฐ, ์ด ๋๋ก ๊ทธ๋๋ก ๋ณต์ฌํด์ ๋ถ์ฌ๋ฃ๊ธฐ ํด์ ์ฐ๋ฉด๋๋ค.
yarn chromatic --project-token=<project-token>

์๋ฃ๋๋ฉด ๋งํฌ๋ฅผ ๋ฐ๋๋ฐ ์ฌ๊ธฐ๋ก ๋ค์ด๊ฐ๋ฉด ์ ์์ ์ผ๋ก ๋ฐฐํฌ๊ฐ ์๋ฃ๋จ์ ํ์ธํ ์ ์๋ค.

ํ์ ์ด๋๋ ๋งํฌ๋ ์ด๋ฉ์ผ๋ก ๊ฐ๋ฅํ๋ค.

chromatic์ ์ฌ์ฉํ๋ฉด ๋น๋ log๋ฅผ ํ์ธํ ์ ์๋ค.

'FRONTEND > ๊ธฐํ' ์นดํ ๊ณ ๋ฆฌ์ ๋ค๋ฅธ ๊ธ
| Object.entries() ๊ฐ์ฒด์ ํค-๊ฐ ์์ ๋ฐฐ์ด๋ก ๋ง๋ค์ด ๋ฐํํ๋ ๋ฉ์๋ (0) | 2024.12.30 |
|---|---|
| MonthPicker ๋ผ์ด๋ธ๋ฌ๋ฆฌ ๋ชจ์ (2) | 2024.12.26 |
| Input -> type="number" ํ๊ธ ์์ ์ ๋ ฅ ๋ฐฉ์ง (0) | 2024.09.10 |
| [Typescript] ๊ณต๋ถ ๋ด์ฉ ์ ๋ฆฌ (1) | 2024.08.30 |
| (APIํ์ฉ) ๊นํ๋ธ ์ ์ ์ฐพ๊ธฐ app 2 (1) | 2023.11.14 |