Skip to content

Commit

Permalink
📦 chore(custom): 독립 레포로 마이그레이션
Browse files Browse the repository at this point in the history
  • Loading branch information
qwer0114 committed Jan 17, 2025
1 parent 8bb869d commit 94a7c97
Show file tree
Hide file tree
Showing 67 changed files with 6,904 additions and 0 deletions.
61 changes: 61 additions & 0 deletions .cz-config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
export const types = [
{
value: '✨ feat',
name: '✨ feat: 기능 추가 시 사용',
},
{
value: '🐛 fix',
name: '🐛 fix: 버그 수정 시 사용',
},
{
value: '♻️ refactor',
name: '♻️ refactor: 구조 변경, 코드 아키텍처 변경 시 사용',
},
{
value: '⚡️ perf',
name: '⚡️ perf: 성능 개선 및 코드 개선 시 사용',
},
{
value: '💄 style',
name: '💄 style: 스타일 수정 시 사용',
},
{
value: '📝 docs',
name: '📝 docs: 문서 수정 시 사용',
},
{
value: '✅ test',
name: '✅ test: 테스트 코드 수정, 추가 시 사용',
},
{
value: '📦 chore',
name: '📦 chore: 개발 환경 구축, 설정 시 사용',
},
{
value: '🧼 clean',
name: '🧼 clean: 사소한 코드 수정, 코드 정리',
},
];

export const messages = {
type: '커밋 메세지 타입을 선택해주세요: ',
subject: '커밋 메세지 내용을 입력해주세요: ',
confirm: '커밋 내용이 확실한가요?',
};

export const config = {
allowCustomScopes: false,
skipQuestions: ['body', 'scope', 'footer'],
skipEmptyScopes: false,
subjectLimit: 100,
};

// Default export for backwards compatibility
export default {
types,
messages,
allowCustomScopes: config.allowCustomScopes,
skipQuestions: config.skipQuestions,
skipEmptyScopes: config.skipEmptyScopes,
subjectLimit: config.subjectLimit,
};
16 changes: 16 additions & 0 deletions .github/ISSUE_TEMPLATE/✨-feature.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
name: "✨ Feature"
about: 새로운 기능 추가
title: "[FEAT] - "
labels: ''
assignees: ''

---

## 📝 설명
<!-- 추가하고 싶은 기능에 대해 설명해주세요 -->

## ✅ 체크리스트
<!-- 해야 할 작업을 작성해주세요 -->
- [ ]
- [ ]
25 changes: 25 additions & 0 deletions .github/ISSUE_TEMPLATE/🐞-bug.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
---
name: "\U0001F41E Bug"
about: 버그 수정 및 문제 해결
title: "[BUG] - "
labels: ''
assignees: ''

---

## 🔍 버그 설명
<!-- 어떤 버그인지 자세히 설명해주세요 -->

## 🔄 재현 방법 (선택)
<!-- 버그가 발생하는 상황을 설명해주세요 -->
1.
2.
3.

## ✅ 체크리스트
<!-- 버그 수정을 위해 필요한 작업을 작성해주세요 -->
- [ ]
- [ ]

## 📸 스크린샷 (선택)
<!-- 버그 상황을 보여주는 스크린샷이 있다면 첨부해주세요 -->
25 changes: 25 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
## 📝 PR 내용

<!-- 작업 내용과 관련된 설명을 적어주세요 -->

## ✅ 작업 내용

<!-- 리뷰어가 중점적으로 봐야 하는 부분을 상세히 나열해주세요 -->

## 📸 스크린 샷 / 영상 (선택)

<!-- UI 변경사항이 있다면 스크린샷이나 영상을 첨부해주세요 -->

## 🤔 고민 했던 부분 (선택)

<!-- 작업 중 고민했던 부분과 해결 방법을 공유해주세요 -->

- 문제:
- 해결:
- 리뷰어의 의견이 필요한 부분:

## 🔗 연관 이슈

<!-- 관련된 이슈를 링크해주세요 -->

- Closes #
50 changes: 50 additions & 0 deletions .github/workflows/chromatic.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: Chromatic CI

on:
pull_request:
branches:
- main
- develop
push:
branches:
- main
- develop

permissions:
contents: write
pull-requests: write

jobs:
test-and-deploy-storybook:
runs-on: ubuntu-latest

steps:
- name: Check out code
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Use Node
uses: actions/setup-node@v3
with:
node-version: 18

- name: Install dependencies
run: npm install

- name: Build Storybook
run: npm run build-storybook

- name: Publish to Chromatic
id: chromatic
uses: chromaui/action@latest
with:
projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}
storybookBuildDir: /tmp/chromatic-storybook

- name: Comment PR with Storybook link
uses: thollander/actions-comment-pull-request@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
message: '🚀 Storybook 링크: ${{ steps.chromatic.outputs.storybookUrl }}'
24 changes: 24 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*

node_modules
dist
dist-ssr
*.local

# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
.DS_Store
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
16 changes: 16 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"printWidth": 120,
"trailingComma": "all",
"tabWidth": 2,
"semi": true,
"singleQuote": true,
"bracketSpacing": true,
"arrowParens": "always",
"useTabs": false,
"plugins": ["@trivago/prettier-plugin-sort-imports", "prettier-plugin-tailwindcss"],
"importOrder": ["^react(.*)$", "^@components(.*)$", "<THIRD_PARTY_MODULES>", "^[./]"],
"importOrderSeparation": false,
"importOrderSortSpecifiers": true,
"importOrderCaseInsensitive": true,
"importOrderParserPlugins": ["typescript", "jsx"]
}
16 changes: 16 additions & 0 deletions .storybook/main.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import type { StorybookConfig } from '@storybook/react-vite';

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/react-vite',
options: {},
},
};
export default config;
15 changes: 15 additions & 0 deletions .storybook/preview.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import type { Preview } from '@storybook/react';
import '../src/index.css';

const preview: Preview = {
parameters: {
controls: {
matchers: {
color: /(background|color)$/i,
date: /Date$/i,
},
},
},
};

export default preview;
26 changes: 26 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import js from '@eslint/js';
import reactHooks from 'eslint-plugin-react-hooks';
import reactRefresh from 'eslint-plugin-react-refresh';
import globals from 'globals';
import tseslint from 'typescript-eslint';

export default tseslint.config(
{ ignores: ['dist'] },
{
extends: [js.configs.recommended, ...tseslint.configs.recommended],
files: ['**/*.{ts,tsx}'],
languageOptions: {
ecmaVersion: 2020,
globals: globals.browser,
},
plugins: {
'react-hooks': reactHooks,
'react-refresh': reactRefresh,
},
rules: {
...reactHooks.configs.recommended.rules,
'react-refresh/only-export-components': ['warn', { allowConstantExport: true }],
'no-console': ['error', { allow: ['warn', 'error'] }],
},
},
);
13 changes: 13 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Vite + React + TS</title>
</head>
<body>
<div id="root"></div>
<script type="module" src="/src/main.tsx"></script>
</body>
</html>
68 changes: 68 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
{
"name": "maru_egg_client",
"private": true,
"version": "0.0.0",
"type": "module",
"scripts": {
"dev": "vite",
"build": "tsc -b && vite build",
"lint": "eslint .",
"preview": "vite preview",
"storybook": "storybook dev -p 6006",
"commit": "cz",
"build-storybook": "storybook build"
},
"dependencies": {
"@tanstack/react-query": "^5.64.1",
"axios": "^1.7.9",
"clsx": "^2.1.1",
"commitizen": "^4.3.1",
"cz-customizable": "^7.4.0",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"react-router-dom": "^7.1.1",
"tailwind-merge": "^2.6.0",
"vite-plugin-svgr": "^4.3.0",
"zustand": "^5.0.3"
},
"devDependencies": {
"@chromatic-com/storybook": "3.2.3",
"@eslint/js": "^9.17.0",
"@storybook/addon-essentials": "8.6.0-alpha.0",
"@storybook/addon-interactions": "8.6.0-alpha.0",
"@storybook/addon-onboarding": "8.6.0-alpha.0",
"@storybook/blocks": "8.6.0-alpha.0",
"@storybook/react": "8.6.0-alpha.0",
"@storybook/react-vite": "8.6.0-alpha.0",
"@storybook/test": "8.6.0-alpha.0",
"@trivago/prettier-plugin-sort-imports": "^5.2.1",
"@types/react": "^18.3.18",
"@types/react-dom": "^18.3.5",
"@vitejs/plugin-react": "^4.3.4",
"autoprefixer": "^10.4.20",
"chromatic": "^11.25.0",
"eslint": "^9.17.0",
"eslint-plugin-react-hooks": "^5.0.0",
"eslint-plugin-react-refresh": "^0.4.16",
"eslint-plugin-storybook": "^0.11.2",
"globals": "^15.14.0",
"postcss": "^8.5.1",
"prettier": "^3.2.5",
"prettier-plugin-tailwindcss": "^0.6.9",
"storybook": "8.6.0-alpha.0",
"tailwindcss": "^3.4.17",
"typescript": "~5.6.2",
"typescript-eslint": "^8.18.2",
"vite": "^6.0.5"
},
"config": {
"commitizen": {
"path": "cz-customizable"
}
},
"eslintConfig": {
"extends": [
"plugin:storybook/recommended"
]
}
}
Loading

0 comments on commit 94a7c97

Please sign in to comment.