-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9149004
commit 5384ea9
Showing
209 changed files
with
23,883 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,46 @@ | ||
name: Build and Deploy Storybook | ||
|
||
on: | ||
push: | ||
branches: | ||
- develop | ||
|
||
jobs: | ||
build-and-deploy: | ||
name: Build and Deploy Storybook | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: '18' | ||
cache: 'npm' | ||
|
||
- name: Install dependencies | ||
run: npm install | ||
|
||
- name: Set CI Environment to start Mock Server | ||
run: echo "ACTIVATE_MOCK_SERVER=true" >> .env | ||
|
||
- name: Set Environment Variables | ||
run: | | ||
echo "NEXT_BOOK_NARU_API_KEY=${{ secrets.NEXT_BOOK_NARU_API_KEY }}" >> .env | ||
echo "NEXT_PUBLIC_BOOK_LIBRARY_API_KEY=${{ secrets.NEXT_PUBLIC_BOOK_LIBRARY_API_KEY }}" >> .env | ||
- name: Check Environment Variables | ||
run: | | ||
echo "NEXT_BOOK_NARU_API_KEY=${{ secrets.NEXT_BOOK_NARU_API_KEY }}" | ||
echo "NEXT_PUBLIC_BOOK_LIBRARY_API_KEY=${{ secrets.NEXT_PUBLIC_BOOK_LIBRARY_API_KEY }}" | ||
- name: Build Storybook | ||
run: npm run build-storybook | ||
|
||
- name: Deploy Storybook | ||
uses: peaceiris/actions-gh-pages@v3 | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
publish_dir: ./storybook-static |
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,45 @@ | ||
name: CI | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- develop | ||
|
||
jobs: | ||
ci: | ||
name: Build and Test | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: '18' | ||
cache: 'npm' | ||
|
||
- name: Install dependencies | ||
run: npm install | ||
|
||
- name: Set Environment Variables | ||
run: | | ||
echo "NEXT_BOOK_NARU_API_KEY=${{ secrets.NEXT_BOOK_NARU_API_KEY }}" >> .env | ||
echo "NEXT_PUBLIC_BOOK_LIBRARY_API_KEY=${{ secrets.NEXT_PUBLIC_BOOK_LIBRARY_API_KEY }}" >> .env | ||
- name: Check Environment Variables | ||
run: | | ||
echo "NEXT_BOOK_NARU_API_KEY=${{ secrets.NEXT_BOOK_NARU_API_KEY }}" | ||
echo "NEXT_PUBLIC_BOOK_LIBRARY_API_KEY=${{ secrets.NEXT_PUBLIC_BOOK_LIBRARY_API_KEY }}" | ||
- name: Build Next.js | ||
run: npm run build | ||
|
||
- name: Build Storybook | ||
run: npm run build-storybook | ||
|
||
- name: Verify Storybook Deployment | ||
if: ${{ github.event_name == 'pull_request' }} | ||
run: | | ||
echo "You can deploy Storybook for further testing using npm run deploy-storybook if needed." |
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,44 @@ | ||
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. | ||
|
||
# dependencies | ||
/node_modules | ||
/.pnp | ||
.pnp.* | ||
.yarn/* | ||
!.yarn/patches | ||
!.yarn/plugins | ||
!.yarn/releases | ||
!.yarn/versions | ||
|
||
# testing | ||
/coverage | ||
|
||
# next.js | ||
/.next/ | ||
/out/ | ||
|
||
# production | ||
/build | ||
|
||
# misc | ||
.DS_Store | ||
*.pem | ||
|
||
# debug | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
.pnpm-debug.log* | ||
|
||
# env files (can opt-in for committing if needed) | ||
.env* | ||
|
||
# vercel | ||
.vercel | ||
|
||
# typescript | ||
*.tsbuildinfo | ||
next-env.d.ts | ||
|
||
*storybook.log | ||
storybook-static/* |
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,28 @@ | ||
import type { StorybookConfig } from '@storybook/nextjs'; | ||
import path from 'path'; | ||
|
||
const config: StorybookConfig = { | ||
stories: ['../src/**/*.mdx', '../src/**/*.stories.@(js|jsx|mjs|ts|tsx)'], | ||
addons: [ | ||
'@storybook/addon-onboarding', | ||
'@storybook/addon-essentials', | ||
'@chromatic-com/storybook', | ||
'@storybook/addon-interactions', | ||
], | ||
framework: { | ||
name: '@storybook/nextjs', | ||
options: {}, | ||
}, | ||
staticDirs: ['../public'], | ||
webpackFinal: async (config) => { | ||
config.resolve = { | ||
...config.resolve, | ||
alias: { | ||
...(config.resolve?.alias || {}), | ||
'@': path.resolve(__dirname, '../src'), | ||
}, | ||
}; | ||
return config; | ||
}, | ||
}; | ||
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,52 @@ | ||
import React from 'react'; | ||
|
||
import type { Preview } from '@storybook/react'; | ||
|
||
import '@/styles/variables.scss'; | ||
import '@/styles/globals.scss'; | ||
import '@/styles/reset.scss'; | ||
|
||
const GlobalStyles = ` | ||
@font-face { | ||
font-family: 'Pretendard'; | ||
src: url('https://fastly.jsdelivr.net/gh/Project-Noonnu/[email protected]/Pretendard-Regular.woff') format('woff2'); | ||
font-display: swap; | ||
} | ||
body { | ||
font-family: 'Pretendard', sans-serif; | ||
} | ||
.storyWrapper{ | ||
margin: 2.4rem | ||
} | ||
`; | ||
|
||
const preview: Preview = { | ||
parameters: { | ||
controls: { | ||
matchers: { | ||
color: /(background|color)$/i, | ||
date: /Date$/i, | ||
}, | ||
}, | ||
backgrounds: { | ||
values: [ | ||
{ name: 'White', value: '#ffffff' }, | ||
{ name: 'Dark', value: '#000' }, | ||
{ name: 'Light', value: '#f9f9f9' }, | ||
], | ||
default: 'Light', | ||
}, | ||
}, | ||
decorators: [ | ||
(Story) => ( | ||
<div> | ||
<style>{GlobalStyles}</style> | ||
<div className="storyWrapper">{Story()}</div> | ||
</div> | ||
), | ||
], | ||
}; | ||
|
||
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 @@ | ||
# BOOKER | ||
|
||
- [🌱 dev 페이지](https://dev-booker-52.vercel.app/) | ||
<!-- [🍀 production 페이지](https://booker-52.vercel.app/)https://booker-52.vercel.app/--> | ||
- [📔 스토리북](https://badahertz52.github.io/booker) |
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,97 @@ | ||
import { FlatCompat } from '@eslint/eslintrc'; | ||
import { dirname } from 'path'; | ||
import { fileURLToPath } from 'url'; | ||
import eslintPluginPrettier from 'eslint-plugin-prettier'; | ||
import typescriptEslint from '@typescript-eslint/eslint-plugin'; | ||
import eslintPluginJsxA11y from 'eslint-plugin-jsx-a11y'; | ||
import tsParser from '@typescript-eslint/parser'; | ||
|
||
const __filename = fileURLToPath(import.meta.url); | ||
const __dirname = dirname(__filename); | ||
|
||
const compat = new FlatCompat({ | ||
baseDirectory: __dirname, | ||
}); | ||
|
||
const eslintConfig = [ | ||
...compat.extends( | ||
'next/core-web-vitals', | ||
'next/typescript', | ||
'plugin:prettier/recommended', | ||
'plugin:jsx-a11y/recommended', | ||
'plugin:@typescript-eslint/recommended', | ||
), | ||
{ | ||
files: ['**/*.ts', '**/*.tsx'], | ||
languageOptions: { | ||
parser: tsParser, | ||
parserOptions: { | ||
project: './tsconfig.json', | ||
tsconfigRootDir: __dirname, | ||
ecmaVersion: 2020, | ||
sourceType: 'module', | ||
ecmaFeatures: { | ||
jsx: true, | ||
}, | ||
}, | ||
}, | ||
plugins: { | ||
prettier: eslintPluginPrettier, | ||
'@typescript-eslint': typescriptEslint, | ||
'jsx-a11y': eslintPluginJsxA11y, | ||
}, | ||
settings: { | ||
react: { | ||
version: 'detect', | ||
}, | ||
}, | ||
rules: { | ||
'react/react-in-jsx-scope': 'off', | ||
'@typescript-eslint/no-explicit-any': 'off', | ||
'react-hooks/exhaustive-deps': 'off', | ||
'@typescript-eslint/naming-convention': [ | ||
'error', | ||
{ | ||
selector: 'typeAlias', | ||
format: ['PascalCase'], | ||
}, | ||
{ | ||
selector: 'interface', | ||
format: ['PascalCase'], | ||
}, | ||
], | ||
'import/order': [ | ||
'error', | ||
{ | ||
'newlines-between': 'always', | ||
groups: [['builtin', 'external'], 'internal', 'parent', 'sibling', 'index'], | ||
pathGroups: [ | ||
{ | ||
pattern: 'next', | ||
group: 'builtin', | ||
}, | ||
{ | ||
pattern: 'react', | ||
group: 'builtin', | ||
}, | ||
{ | ||
pattern: '@MyDesignSystem/**', | ||
group: 'internal', | ||
}, | ||
{ | ||
pattern: 'src/**', | ||
group: 'internal', | ||
}, | ||
], | ||
pathGroupsExcludedImportTypes: ['src/**', '@MyDesignSystem/**'], | ||
alphabetize: { | ||
order: 'asc', | ||
caseInsensitive: true, | ||
}, | ||
}, | ||
], | ||
}, | ||
}, | ||
]; | ||
|
||
export default eslintConfig; |
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,19 @@ | ||
import type { NextConfig } from 'next'; | ||
|
||
const nextConfig: NextConfig = { | ||
logging: { | ||
fetches: { | ||
fullUrl: true, | ||
}, | ||
}, | ||
images: { | ||
remotePatterns: [ | ||
{ | ||
hostname: 'www.nl.go.kr', | ||
}, | ||
{ hostname: 'image.aladin.co.kr' }, | ||
{ protocol: 'https', hostname: '**' }, | ||
], | ||
}, | ||
}; | ||
export default nextConfig; |
Oops, something went wrong.