Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feat] Pnpm Workspace를 통한 모노레포 도입 #332

Merged
merged 61 commits into from
Dec 4, 2024
Merged
Show file tree
Hide file tree
Changes from 26 commits
Commits
Show all changes
61 commits
Select commit Hold shift + click to select a range
49abb3b
init: pnpm workspace setting, 기존 project -> apps/client
wuzoo Nov 25, 2024
526c632
docs: @tiki/tsconfig package setting
wuzoo Nov 26, 2024
fb78649
docs: root dependencies에 따른 하위 패키지 디펜던시 정리
wuzoo Nov 26, 2024
808fdb0
feat: icon package
wuzoo Nov 26, 2024
b69f4ac
docs: common hook directory
wuzoo Nov 26, 2024
f6e4427
refactor: import error 해결, lib 생성
wuzoo Nov 26, 2024
8f92e94
refactor: utils package 필요한 훅, 함수 이전
wuzoo Nov 26, 2024
adf17ac
feat: 기존 project @common/component 를 제공하는 ui package 세팅
wuzoo Nov 26, 2024
9c1c7de
chore: readme root로
wuzoo Nov 28, 2024
4cf235b
refactor: composition 컴포넌트 default export, index 파일 생성
wuzoo Nov 29, 2024
a201122
feat: tsup config 작성
wuzoo Nov 29, 2024
928a548
chore: client story ui package 반영
wuzoo Nov 29, 2024
7092a3b
docs: theme, type export 추가
wuzoo Nov 29, 2024
c88be36
feat: 모든 기존 코드 @tiki package 반영
wuzoo Nov 29, 2024
c197078
init: landing next project setting
wuzoo Nov 29, 2024
f218371
chore: svg 수정
wuzoo Nov 30, 2024
229ea55
chore: cachedImage common으로 이동
wuzoo Dec 2, 2024
1177ba9
refactor: navbar Item 컴포넌트 구조 수정 (svg는 icon 패키지로만 사용)
wuzoo Dec 2, 2024
1e762a4
refactor: svgr option no-index 추가
wuzoo Dec 2, 2024
61a1c88
refactor: noEmit 제거 및 tsconfig 수정
wuzoo Dec 2, 2024
9b91d78
docs: tsconfig 수정
wuzoo Dec 2, 2024
37177a0
fix: item 컴포넌트 prop type 반영
wuzoo Dec 2, 2024
c12374e
docs: pnpm version match
wuzoo Dec 2, 2024
ad68d9c
docs: ci script 수정
wuzoo Dec 2, 2024
5b6c4a7
docs: storybook deploy workflow command 수정
wuzoo Dec 2, 2024
f8c1dcd
docs: ci build-storybook scripts 추가
wuzoo Dec 2, 2024
a32eb3e
docs: install frozen-lockfile 추가
wuzoo Dec 3, 2024
bfa3ec4
chore: ui tsconfig composite 제거
wuzoo Dec 3, 2024
f9d7e76
fix: package resolve 문제 alias 추가
wuzoo Dec 3, 2024
ba947d6
fix: main.ts @tiki/ui alias 추가
wuzoo Dec 3, 2024
33adf33
chore: icon, utils package 추가
wuzoo Dec 3, 2024
ea974d1
fix: preview @tiki/ui/dist 로부터 import
wuzoo Dec 3, 2024
9c5ff3b
fix: preview resolve package issue try 1
wuzoo Dec 3, 2024
60c5aeb
fix: preview resolve package issue try 2
wuzoo Dec 3, 2024
506eced
fix: preview resolve package issue try 3
wuzoo Dec 3, 2024
cc09d57
fix: preview resolve package issue try 4
wuzoo Dec 3, 2024
09b4c9a
fix: preview resolve package issue try 5 (optimizeDeps)
wuzoo Dec 3, 2024
7a1252d
fix: preview resolve package issue try 6
wuzoo Dec 3, 2024
89245f1
docs: ui, icon package.json exports 추가
wuzoo Dec 3, 2024
113e78c
fix: preview resolve package issue try 7
wuzoo Dec 3, 2024
003f1fd
fix: preview resolve package issue try 8
wuzoo Dec 3, 2024
66010f5
fix: preview resolve package issue try 9
wuzoo Dec 3, 2024
48bd42f
chore: .npmrc를 통한 symlink 추가
wuzoo Dec 3, 2024
a7f4b78
chore: getAbsolutePath, mergeConfig 적용
wuzoo Dec 3, 2024
992c65e
fix: preview resolve package issue try 10
wuzoo Dec 3, 2024
6e125bd
fix: preview resolve package issue try 11
wuzoo Dec 3, 2024
534c4ee
fix: preview resolve package issue try 12
wuzoo Dec 3, 2024
9c2809f
fix: preview resolve package issue try 13
wuzoo Dec 3, 2024
cef4e7d
fix: preview resolve package issue try 14
wuzoo Dec 3, 2024
df9aa9b
fix: preview resolve package issue try 15
wuzoo Dec 3, 2024
4024f4f
chore: resolve alias 적용, ui package exports 다시 세팅
wuzoo Dec 3, 2024
6fee654
chore: relative path 수정
wuzoo Dec 3, 2024
b4a8fdb
chore: icon build script 추가
wuzoo Dec 3, 2024
a4e2e25
chore: alias 제거
wuzoo Dec 3, 2024
c2a281a
chore: hoisting pattern 추가
wuzoo Dec 3, 2024
af9df14
docs: ui, icon build caching
wuzoo Dec 3, 2024
3d240cd
fix: version 오타 수정
wuzoo Dec 3, 2024
3831dd9
chore: node modules caching setting
wuzoo Dec 3, 2024
181df11
docs: storybook deploy workflow 수정
wuzoo Dec 3, 2024
85ac958
chore: 불필요 파일 제거 및 git ignore
wuzoo Dec 3, 2024
dfbc8b7
chore: next tsconfig 임시 설정
wuzoo Dec 3, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
10 changes: 10 additions & 0 deletions .editorConfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
root = true

[*]
charset = utf-8
end_of_line = lf
indent_size = 2
indent_style = space
insert_final_newline = true
max_line_length = 120
trim_trailing_whitespace = true
2 changes: 1 addition & 1 deletion .github/workflows/automatic-aws-deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: 9
version: 9.1.3

- name: Install dependencies
run: pnpm install --frozen-lockfile
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
- name: Setup Pnpm
uses: pnpm/action-setup@v4
with:
version: 9
version: 9.1.3

- name: Cache node modules
id: cache-node
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/chromatic.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: 9
version: 9.1.3
- name: Setup Node.js
uses: actions/setup-node@v4
with:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/storybook-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@ jobs:
- name: Install Pnpm
uses: pnpm/action-setup@v4
with:
version: 9
version: 9.1.3

- name: Install dependencies
run: pnpm install --frozen-lockfile

- name: Build
run: pnpm build-storybook
run: pnpm client build-storybook

- name: Deploy
uses: peaceiris/actions-gh-pages@v4
Expand Down
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ dist-ssr
*.njsproj
*.sln
*.sw?
.env

**/.next-env.d.ts
**/.env

*storybook.log
storybook-static

29 changes: 0 additions & 29 deletions .prettierrc

This file was deleted.

File renamed without changes.
31 changes: 31 additions & 0 deletions apps/client/.prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{
"plugins": ["@trivago/prettier-plugin-sort-imports"],

"printWidth": 120,
"tabWidth": 2,
"semi": true,
"singleQuote": true,
"trailingComma": "es5",
"requirePragma": false,
"arrowParens": "always",
"bracketSameLine": true,
"endOfLine": "auto",

"importOrder": [
"^react(.*)",
"^@emtion/(.*)$",
"^@tanstack/(.*)$",
"^zustand(.*)",
"^axios(.*)",
"^msw(.*)",
"^@/common/(.*)$",
"^@/page/(.*)$",
"^@/shared/(.*)$",
"^@/story/(.*)$",
"^@/mock/(.*)$",
"^[./]"
],
"importOrderSeparation": true,
"importOrderSortSpecifiers": true
}

File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import { Global, ThemeProvider } from '@emotion/react';
import type { Preview } from '@storybook/react';
import { theme } from '@tiki/ui';

import React from 'react';
import { MemoryRouter } from 'react-router-dom';

import { QueryClient, QueryClientProvider } from '@tanstack/react-query';

import { GlobalStyle } from '../src/common/style/globalStyle';
import { theme } from '../src/common/style/theme/theme';

const customViewports = {
Default: {
Expand Down
2 changes: 1 addition & 1 deletion index.html → apps/client/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<html lang="ko">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/src/common/asset/svg/favicon.svg" />
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel='preload' href="/font/subset-PretendardVariable.woff2" />
<link rel='preload' href="/font/subset-PretendardVariable.woff" />
Expand Down
71 changes: 71 additions & 0 deletions apps/client/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
{
"name": "client",
"version": "0.0.0",
"private": true,
"type": "module",
"scripts": {
"build": "tsc && vite build",
"build-storybook": "storybook build",
"chromatic": "npx chromatic --project-token=chpt_f4088febbfb82b7",
"dev": "vite",
"lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
"preview": "vite preview",
"storybook": "storybook dev -p 6006"
},
"dependencies": {
"@sentry/react": "^8.22.0",
"@tanstack/react-query": "^5.49.2",
"@tanstack/react-query-devtools": "^5.49.2",
"@tiki/icon": "workspace:^",
"@tiki/ui": "workspace:^",
"@tiki/utils": "workspace:^",
"axios": "^1.7.2",
"framer-motion": "^11.11.11",
"mime": "^4.0.4",
"react-hook-form": "^7.53.1",
"react-router-dom": "^6.24.1"
},
"devDependencies": {
"@chromatic-com/storybook": "^1.6.1",
"@eslint/js": "^9.6.0",
"@sentry/vite-plugin": "^2.21.1",
"@storybook/addon-a11y": "^8.2.6",
"@storybook/addon-essentials": "^8.2.6",
"@storybook/addon-interactions": "^8.2.6",
"@storybook/addon-links": "^8.2.6",
"@storybook/addon-onboarding": "^8.2.6",
"@storybook/blocks": "^8.2.6",
"@storybook/builder-vite": "^8.2.6",
"@storybook/react": "^8.2.6",
"@storybook/react-vite": "^8.2.6",
"@storybook/test": "^8.2.6",
"@tiki/tsconfig": "workspace:^",
"@trivago/prettier-plugin-sort-imports": "^4.3.0",
"@types/react-slick": "^0.23.13",
"@typescript-eslint/eslint-plugin": "^7.13.1",
"@typescript-eslint/parser": "^7.13.1",
"@vitejs/plugin-react": "^4.3.1",
"@vitejs/plugin-react-swc": "^3.5.0",
"chromatic": "^11.5.4",
"concurrently": "^9.0.1",
"eslint": "^8.57.0",
"eslint-config-prettier": "^9.1.0",
"eslint-import-resolver-typescript": "^3.6.1",
"eslint-plugin-import": "^2.29.1",
"eslint-plugin-jsx-a11y": "^6.9.0",
"eslint-plugin-prettier": "^5.1.3",
"eslint-plugin-react": "^7.34.3",
"eslint-plugin-react-hooks": "^4.6.2",
"eslint-plugin-react-refresh": "^0.4.7",
"eslint-plugin-storybook": "^0.8.0",
"globals": "^15.7.0",
"msw": "^2.3.1",
"prettier": "^3.3.2",
"rollup-plugin-visualizer": "^5.12.0",
"storybook": "^8.2.6",
"typescript-eslint": "^7.14.1",
"vite": "^5.3.2",
"vite-plugin-svgr": "^4.2.0",
"vite-tsconfig-paths": "^4.3.2"
}
}
File renamed without changes
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { HTMLAttributes } from 'react';
import { useCachedImage } from '@tiki/utils';

import useCachedImage from '@/common/hook/useCachedImage';
import { HTMLAttributes } from 'react';

interface CachedImageProps extends HTMLAttributes<HTMLImageElement> {
imageUrl: string;
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 1 addition & 3 deletions src/main.tsx → apps/client/src/main.tsx
Original file line number Diff line number Diff line change
@@ -1,16 +1,14 @@
import { Global, ThemeProvider } from '@emotion/react';
import { ToastContainer, ToastProvider, theme } from '@tiki/ui';

import React from 'react';
import { createRoot } from 'react-dom/client';

import { QueryClient, QueryClientProvider } from '@tanstack/react-query';
import { ReactQueryDevtools } from '@tanstack/react-query-devtools';

import ToastContainer from '@/common/component/ToastContainer/ToastContainer';
import ToastProvider from '@/common/component/ToastContainer/ToastProvider';
import { AppRouter } from '@/common/router/Router';
import { GlobalStyle } from '@/common/style/globalStyle';
import { theme } from '@/common/style/theme/theme';

import { worker } from '@/mock/browser';

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
import { Button, Flex } from '@tiki/ui';

import { Suspense, useEffect } from 'react';
import { useLocation } from 'react-router-dom';

import Button from '@/common/component/Button/Button';
import Flex from '@/common/component/Flex/Flex';

import { contentStyle, pageStyle, timelineStyle } from '@/page/archiving/index/ArchivingPage.style';
import DateProvider from '@/page/archiving/index/DateProvider';
import TimeLine from '@/page/archiving/index/component/TimeLine';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { css } from '@emotion/react';

import { theme } from '@/common/style/theme/theme';
import { theme } from '@tiki/ui';

export const containerStyle = (blockSelected: string) =>
css({
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { ForwardedRef, forwardRef } from 'react';
import { theme } from '@tiki/ui';

import { theme } from '@/common/style/theme/theme';
import { ForwardedRef, forwardRef } from 'react';

import { containerStyle } from '@/page/archiving/index/component/DocumentBar/DocumentBar.style';
import { Block } from '@/page/archiving/index/type/blockType';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { css } from '@emotion/react';

import { theme } from '@/common/style/theme/theme';
import { theme } from '@tiki/ui';

export const containerStyle = css({
display: 'flex',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
/* eslint-disable jsx-a11y/click-events-have-key-events */
import { ReactNode } from 'react';
import { IcDelete, IcDownload } from '@tiki/icon';
import { Flex, Text } from '@tiki/ui';

import TrashBox from '@/common/asset/svg/ic_delete.svg?react';
import Download from '@/common/asset/svg/ic_download.svg?react';
import Flex from '@/common/component/Flex/Flex';
import Text from '@/common/component/Text/Text';
import { ReactNode } from 'react';

import { containerStyle, fileNameStyle } from '@/page/archiving/index/component/DocumentBar/Item/Item.style';
import { downloadDocument } from '@/page/archiving/index/util/document';
Expand Down Expand Up @@ -50,8 +48,8 @@ const Item = ({ documentId, children, fileUrl, fileName }: ItemProps) => {
<Text tag="body6" css={fileNameStyle}>
{fileName}
</Text>
<Download width={20} height={20} css={{ cursor: 'pointer' }} onClick={handleDownloadClick} />
<TrashBox width={20} height={20} onClick={(e) => handleTrashBoxClick(e)} css={{ cursor: 'pointer' }} />
<IcDownload width={20} height={20} css={{ cursor: 'pointer' }} onClick={handleDownloadClick} />
<IcDelete width={20} height={20} onClick={(e) => handleTrashBoxClick(e)} css={{ cursor: 'pointer' }} />
</Flex>
</li>
</>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { css } from '@emotion/react';

import { theme } from '@/common/style/theme/theme';
import { theme } from '@tiki/ui';

export const blockNameStyle = css({
paddingRight: '0.4rem',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
import Button from '@/common/component/Button/Button';
import Flex from '@/common/component/Flex/Flex';
import Heading from '@/common/component/Heading/Heading';
import Text from '@/common/component/Text/Text';
import { theme } from '@/common/style/theme/theme';
import { Button, Flex, Heading, Text, theme } from '@tiki/ui';

import DocumentItem from '@/page/archiving/index/component/DocumentBar/Item/Item';
import { blockNameStyle, deleteBtnStyle } from '@/page/archiving/index/component/DocumentBar/Selected/Selected.style';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { css } from '@emotion/react';

import { theme } from '@/common/style/theme/theme';
import { theme } from '@tiki/ui';

export const buttonStyle = css({
display: 'flex',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { useEffect } from 'react';
import { Select } from '@tiki/ui';
import { useOutsideClick, useOverlay } from '@tiki/utils';

import Select from '@/common/component/Select/Select';
import { useOutsideClick, useOverlay } from '@/common/hook';
import { useEffect } from 'react';

import { fontStyle } from '@/page/archiving/index/component/DocumentBar/Sort/Sort.style';
import { OPTIONS } from '@/page/archiving/index/constant/sortOption';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
import { useState } from 'react';
import { IcSearch } from '@tiki/icon';
import { Flex, Input, Text } from '@tiki/ui';
import { useDebounce } from '@tiki/utils';

import SearchIc from '@/common/asset/svg/ic_search.svg?react';
import Flex from '@/common/component/Flex/Flex';
import Input from '@/common/component/Input/Input';
import Text from '@/common/component/Text/Text';
import { useDebounce } from '@/common/hook';
import { useState } from 'react';

import Item from '@/page/archiving/index/component/DocumentBar/Item/Item';
import { blockNameStyle } from '@/page/archiving/index/component/DocumentBar/Item/Item.style';
Expand Down Expand Up @@ -41,7 +39,7 @@ const DocumentTotal = () => {
<Input
placeholder={'문서를 검색해보세요'}
value={searchWord}
LeftIcon={<SearchIc />}
LeftIcon={<IcSearch />}
onChange={(e) => {
setSearchWord(e.target.value);
}}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { css } from '@emotion/react';

import { theme } from '@/common/style/theme/theme';
import { theme } from '@tiki/ui';

export const periodStyle = css({
color: theme.colors.gray_800,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
import DatePicker from '@/common/component/DatePicker';
import Flex from '@/common/component/Flex/Flex';
import Heading from '@/common/component/Heading/Heading';
import Input from '@/common/component/Input/Input';
import Text from '@/common/component/Text/Text';
import { DatePicker, Flex, Heading, Input, Text } from '@tiki/ui';

import { periodStyle, titleInputStyle } from '@/page/archiving/index/component/TimeBlockBar/BlockInfo/BlockInfo.style';
import { formattingDate } from '@/page/archiving/index/util/date';
Expand Down
Loading
Loading