GithubHelp home page GithubHelp logo

shinheylynn / storybook-multi-framework Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 1.0 1.26 MB

๐Ÿ“– ์ธํ‹ฐ๊ทธ๋ ˆ์ด์…˜์—์„œ ์‚ฌ์šฉํ•œ Multi-framework Storybook ์†Œ์Šค์ฝ”๋“œ์ž…๋‹ˆ๋‹ค.

Home Page: https://ui.integrationcorp.co.kr/

License: MIT License

JavaScript 28.63% SCSS 23.17% Vue 45.81% CSS 0.09% MDX 1.95% HTML 0.35%
multi-frameworks storybook storybook-ui

storybook-multi-framework's Introduction





Project ์†Œ๊ฐœ

๐Ÿ“Œ ๋ฌธ์ œ์ 

  • Vue.js๋ฅผ ์‚ฌ์šฉํ•˜๋Š” Moreden
  • React.js๋ฅผ ์‚ฌ์šฉํ•˜๋Š” Medistream

๋‘ ์‚ฌ์ดํŠธ ๋ชจ๋‘ ๋™์ผํ•œ UI ์ปดํฌ๋„ŒํŠธ๋“ค์„ ์‚ฌ์šฉํ•˜๊ณ  ์žˆ์œผ๋‚˜, ํ”„๋ ˆ์ž„์›Œํฌ๊ฐ€ ๋‹ค๋ฅด๊ธฐ ๋•Œ๋ฌธ์— ๊ฐ๊ธฐ ๋‹ค๋ฅธ ์ €์žฅ์†Œ์—์„œ ๊ด€๋ฆฌ ์ค‘์ด์—ˆ์Œ.

์ปดํฌ๋„ŒํŠธ์— ์—…๋ฐ์ดํŠธ๊ฐ€ ์ƒ๊ธฐ๋ฉด ๋‘ ์ €์žฅ์†Œ์—์„œ ๋ชจ๋‘ ์ˆ˜์ •ํ•ด์•ผ ํ•œ๋‹ค๋Š” ๋ฒˆ๊ฑฐ๋กœ์›€์ด ์žˆ์—ˆ๊ธฐ ๋•Œ๋ฌธ์—, ํšจ์œจ๋„๋ฅผ ๋†’์ด๊ธฐ ์œ„ํ•ด์„œ ๋‹ค์–‘ํ•œ ํ”„๋ ˆ์ž„์›Œํฌ๋“ค์„ ํ•˜๋‚˜์˜ ์ €์žฅ์†Œ์—์„œ ๊ด€๋ฆฌํ•  ์ˆ˜ ์žˆ๋„๋ก ํ•œ๋‹ค.

๐Ÿ’ก ๋ชฉํ‘œํ•œ ๋ฐ”๋ฅผ ์ด๋ฃจ๊ณ ์ž Storybook์˜ composition ๊ธฐ๋Šฅ์„ ํ™œ์šฉํ•˜์—ฌ ๊ตฌ์กฐ๋ฅผ ์„ค๊ณ„ํ•œ๋‹ค.


์— ๋Œ€ํ•ด

  1. Storybook ํŠœํ† ๋ฆฌ์–ผ ์ฝ์–ด๋ณด๊ธฐ
  2. UI ์ปดํฌ๋„ŒํŠธ ์ƒ์„ฑ ํ›„ ๋””์ž์ธ ์‹œ์Šคํ…œ์œผ๋กœ ์ œ์ž‘ํ•˜๋Š” ๋ฐฉ๋ฒ•
  3. ๊ณต์‹ ๋ฌธ์„œ ์ฝ์–ด๋ณด๊ธฐ
  4. Composition ๊ธฐ๋Šฅ์— ๋Œ€ํ•ด ์ฝ์–ด๋ณด๊ธฐ

Storybook Multi-Framework ์ž‘์—…:

(ํŽธ์˜์ƒ React library๋ฅผ framework๋กœ ์ง€์นญํ•จ.)

2๊ฐœ ์ด์ƒ์˜ ํ”„๋ ˆ์ž„์›Œํฌ๋ฅผ ํ•˜๋‚˜์˜ Storybook์œผ๋กœ ํ•ฉ์ณ์„œ ํ•˜๋‚˜์˜ ๋ ˆํฌ๋กœ ๊ด€๋ฆฌํ•œ๋‹ค. ์ด๋ฅผ ํ†ตํ•ด ๋‹ค์ˆ˜์˜ ํ”„๋ ˆ์ž„์›Œํฌ๋กœ ์ž‘์„ฑ๋œ UI๋“ค์„ ํšจ์œจ์ ์œผ๋กœ ๊ด€๋ฆฌํ•  ์ˆ˜ ์žˆ๋„๋ก ํ•œ๋‹ค.


Architecture:

root
ใ„ด .storybook
	 story๋Š” ์—†๊ณ , react์™€ vue๋ฅผ compositionํ•˜๋Š” storybook.
ใ„ด stories
	 root-storybook์ด ๋™์ž‘ํ•˜๊ธฐ ์œ„ํ•œ ์ตœ์†Œ ํ•˜๋‚˜ ์ด์ƒ์˜ story๊ฐ€ ์กด์žฌํ•œ๋‹ค.
ใ„ด components
	 UI ์ปดํฌ๋„ŒํŠธ ๊ตฌ์„ฑํ•˜๋Š” jsx, vue ํŒŒ์ผ๋“ค์ด ๋ชจ์—ฌ์žˆ๋‹ค.
ใ„ด [+] react-storybook
	components ๋‚ด jsx๋ฅผ importํ•˜๋Š” story๋“ค์ด ๋ชจ์—ฌ์žˆ๋‹ค.
ใ„ด [+] vue-storybook
	components ๋‚ด vue๋ฅผ importํ•˜๋Š” story๋“ค์ด ๋ชจ์—ฌ์žˆ๋‹ค.

& ๋ฐฐํฌ:

๋ณธ ํ”„๋กœ์ ํŠธ๋Š” root storybook์„ ์ œ์™ธํ•œ ๊ฐ Framework Storybook๋“ค์„ Chromatic์„ ์ด์šฉํ•˜์—ฌ ๋ฐฐํฌํ•œ๋‹ค.

  • root storybook์€ ํšŒ์‚ฌ ๋‚ด ๊ทœ์ •๋Œ€๋กœ AWS S3๋ฅผ ์ด์šฉํ•˜์—ฌ ๋ฐฐํฌํ•จ.

Pipeline

pipelines:
  branches:
    develop:
      - step:
          name: Build
          deployment: Production
          image: node:18
          script:
            - npm install
            - npm run build-storybook
          artifacts:
            - storybook-static/**
      - step:
          name: Deploy to S3
          image: atlassian/pipelines-awscli
          script:
            - aws s3 sync --delete ./storybook-static s3://ui.integrationcorp.co.kr
            - aws cloudfront create-invalidation --distribution-id E2J4QL6EK16P4D --paths "/*"
    react:
      - step:
          name: Build & Deploy
          deployment: Production
          image: node:18
          script:
            - npm install
            - cd storybook-react
            - npm install
            - npm run build-storybook 
            - npx chromatic --project-token $REACT_STORYBOOK_TOKEN --exit-zero-on-changes
          artifacts:
            - storybook-react/storybook-static/**
    vue:
      - step:
          name: Build & Deploy
          deployment: Production
          image: node:16
          script:
            - npm install
            - cd storybook-vue
            - npm install
            - npm run build-storybook 
            - npx chromatic --project-token $VUE_STORYBOOK_TOKEN --exit-zero-on-changes
          artifacts:
            - storybook-vue/storybook-static/**
  tags:
    production-*:
      - step:
          name: Build
          deployment: Production
          image: node:18
          script:
            - npm install
            - npm run build-storybook
          artifacts:
            - storybook-static/**
      - step:
          name: Deploy to S3
          image: atlassian/pipelines-awscli
          script:
            - aws s3 sync --delete ./storybook-static s3://ui.integrationcorp.co.kr
            - aws cloudfront create-invalidation --distribution-id E2J4QL6EK16P4D --paths "/*"

package.json scripts:

npm scripts commands
"storybook" "storybook dev -p 6006"
"storybook:react" "cd storybook-react && npm install && npm run storybook"
"storybook:vue" "cd storybook-vue && npm install && npm run storybook"
"build-storybook" "storybook build"
"build-storybook:react" "cd storybook-react && npm install && npm run build-storybook"
"build-storybook:vue" "cd storybook-vue && npm install && npm run build-storybook"

storybook-multi-framework's People

Contributors

gyeonglin avatar shinheylynn avatar

Watchers

 avatar

Forkers

leylagogebakan

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.