-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Storybook 세팅 및 storybook ci yml 파일 추가
- Loading branch information
1 parent
3b3c8ec
commit da1fa24
Showing
11 changed files
with
23,458 additions
and
5,289 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,8 @@ | ||
{ | ||
"extends": ["next/core-web-vitals", "next/typescript", "prettier"] | ||
"extends": [ | ||
"next/core-web-vitals", | ||
"next/typescript", | ||
"prettier", | ||
"plugin:storybook/recommended" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
name: storybook-test-and-deploy | ||
|
||
on: push | ||
|
||
jobs: | ||
ui-test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@4 | ||
|
||
- uses: pnpm/action-setup@v4 | ||
name: Install pnpm | ||
with: | ||
run_install: false | ||
|
||
- name: Install Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20 | ||
cache: 'pnpm' | ||
|
||
- name: Install node modules | ||
run: pnpm install | ||
|
||
- name: Lint | ||
run: pnpm lint | ||
|
||
- name: deploy storybook&chromatic | ||
uses: chromaui/action@latest | ||
with: | ||
projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }} | ||
autoAcceptChanges: "main" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -34,3 +34,7 @@ yarn-error.log* | |
# typescript | ||
*.tsbuildinfo | ||
next-env.d.ts | ||
|
||
*storybook.log | ||
/storybook-static | ||
*.log |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import type { StorybookConfig } from '@storybook/nextjs'; | ||
|
||
const config: StorybookConfig = { | ||
stories: ['../src/**/*.mdx', '../src/**/*.stories.@(js|jsx|mjs|ts|tsx)'], | ||
addons: [ | ||
'@storybook/addon-links', | ||
'@storybook/addon-essentials', | ||
'@chromatic-com/storybook', | ||
'@storybook/addon-interactions', | ||
'@storybook/addon-a11y', | ||
'@storybook/addon-viewport', | ||
'@storybook/addon-designs', | ||
{ | ||
name: '@storybook/addon-storysource', | ||
options: { | ||
loaderOptions: { | ||
injectStoryParameters: false, | ||
}, | ||
}, | ||
}, | ||
], | ||
framework: { | ||
name: '@storybook/nextjs', | ||
options: {}, | ||
}, | ||
}; | ||
export default config; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import type { Preview } from '@storybook/react'; | ||
import { INITIAL_VIEWPORTS, MINIMAL_VIEWPORTS } from '@storybook/addon-viewport'; | ||
import '../app/globals.css'; | ||
// import {initialize, mswLoader} from "msw-storybook-addon" | ||
// initialize() | ||
|
||
const preview: Preview = { | ||
parameters: { | ||
controls: { | ||
matchers: { | ||
color: /(background|color)$/i, | ||
date: /Date$/i, | ||
}, | ||
}, | ||
viewport: { | ||
viewports: { | ||
...INITIAL_VIEWPORTS, | ||
...MINIMAL_VIEWPORTS, | ||
}, | ||
defaultViewport: 'iphone14promax', | ||
}, | ||
}, | ||
// loaders : [mswLoader] | ||
}; | ||
|
||
export default preview; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"onlyChanged": true, | ||
"projectId": "Project:670940cc682aa6d10aa4f523", | ||
"zip": true | ||
} |
Oops, something went wrong.