Skip to content

Commit

Permalink
chore: packages의 ui를 shared로 변경, library 버전 통일, router 타입 추가 (#39)
Browse files Browse the repository at this point in the history
* chore(common): prettier(3.0.3), eslint(8.45.0) 버전으로 최신화

* chore(ui): packages/ui를 packages/shared로 변경

* chore(common): cz-config의 scopes 속성에서 ui를 shared로 변경

* fix(common): router에 Router를 의미하는 type 추가

* style(volunteer): ui에서 shared로 변경에 따른 import 변경

* fix(common): ui에서 shared로 변경에 따른 tsconfig의 paths 변경

* remove(shared): UploadedPhotoItem 삭제
  • Loading branch information
sukvvon authored Nov 5, 2023
1 parent a2da367 commit a699d61
Show file tree
Hide file tree
Showing 52 changed files with 138 additions and 312 deletions.
2 changes: 1 addition & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module.exports = {
root: true,
extends: ["custom"],
extends: ['custom'],
};
2 changes: 1 addition & 1 deletion apps/shelter/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"react-error-boundary": "^4.0.11",
"react-hook-form": "^7.47.0",
"react-router-dom": "^6.17.0",
"ui": "workspace:*",
"shared": "workspace:*",
"zod": "^3.22.4",
"zustand": "^4.4.4"
},
Expand Down
6 changes: 3 additions & 3 deletions apps/shelter/src/components/layout/index.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { Container } from '@chakra-ui/react';
import { Outlet } from 'react-router-dom';
import BottomNavBar from 'ui/layout/BottomNavBar';
import Header from 'ui/layout/Header';
import { HeaderOption } from 'ui/types/header';
import BottomNavBar from 'shared/layout/BottomNavBar';
import Header from 'shared/layout/Header';
import { HeaderOption } from 'shared/types/header';

export default function Layout() {
const headerOption: HeaderOption = {
Expand Down
4 changes: 2 additions & 2 deletions apps/shelter/src/routes/index.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { createBrowserRouter } from 'react-router-dom';
import { createBrowserRouter, RouterProviderProps } from 'react-router-dom';

import Layout from '@/components/layout';
import PATH from '@/constants/path';
Expand All @@ -25,7 +25,7 @@ import VolunteersSearchPage from '@/pages/volunteers/search';
import VolunteersUpdatePage from '@/pages/volunteers/update';
import VolunteersWritePage from '@/pages/volunteers/write';

export const router = createBrowserRouter([
export const router: RouterProviderProps['router'] = createBrowserRouter([
{
path: '/',
element: <Layout />,
Expand Down
2 changes: 1 addition & 1 deletion apps/volunteer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"react-error-boundary": "^4.0.11",
"react-hook-form": "^7.47.0",
"react-router-dom": "^6.17.0",
"ui": "workspace:*",
"shared": "workspace:*",
"zod": "^3.22.4",
"zustand": "^4.4.4"
},
Expand Down
6 changes: 3 additions & 3 deletions apps/volunteer/src/components/layout/index.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { Container } from '@chakra-ui/react';
import { Outlet } from 'react-router-dom';
import BottomNavBar from 'ui/layout/BottomNavBar';
import Header from 'ui/layout/Header';
import { HeaderOption } from 'ui/types/header';
import BottomNavBar from 'shared/layout/BottomNavBar';
import Header from 'shared/layout/Header';
import { HeaderOption } from 'shared/types/header';

export default function Layout() {
const headerOption: HeaderOption = {
Expand Down
4 changes: 2 additions & 2 deletions apps/volunteer/src/routes/index.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { createBrowserRouter } from 'react-router-dom';
import { createBrowserRouter, RouterProviderProps } from 'react-router-dom';

import Layout from '@/components/layout';
import PATH from '@/constants/path';
Expand All @@ -20,7 +20,7 @@ import VolunteersPage from '@/pages/volunteers';
import VolunteersDetailPage from '@/pages/volunteers/detail';
import VolunteersSearchPage from '@/pages/volunteers/search';

export const router = createBrowserRouter([
export const router: RouterProviderProps['router'] = createBrowserRouter([
{
path: '/',
element: <Layout />,
Expand Down
2 changes: 1 addition & 1 deletion cz-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ module.exports = {
],
scopes: [
{ name: 'common' },
{ name: 'ui' },
{ name: 'shared' },
{ name: 'volunteer' },
{ name: 'shelter' },
],
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,12 @@
"@commitlint/config-conventional": "^18.1.0",
"commitizen": "^4.3.0",
"cz-customizable": "^7.0.0",
"eslint": "^7.32.0",
"eslint": "^8.45.0",
"eslint-config-custom": "workspace:*",
"husky": "^8.0.0",
"lint-staged": "^15.0.2",
"packlint": "^0.2.4",
"prettier": "^2.5.1",
"prettier": "3.0.3",
"turbo": "latest"
}
}
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,5 +1,5 @@
import { Button } from '@chakra-ui/react';

export function CustomButton() {
export default function CustomButton() {
return <Button colorScheme="blue">임시 커스텀 버튼</Button>;
}
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
export function Header() {
export default function Header() {
return <header>커스텀 헤더</header>;
}
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.
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.
2 changes: 1 addition & 1 deletion packages/ui/package.json → packages/shared/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "ui",
"name": "shared",
"version": "0.0.0",
"license": "MIT",
"main": "./index.tsx",
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"target": "es6",
"baseUrl": ".",
"paths": {
"@/*": ["../../packages/ui/*"]
"@/*": ["../../packages/shared/*"]
}
}
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
6 changes: 5 additions & 1 deletion packlint.config.mjs
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
export default {
files: ['./package.json', './packages/*/package.json', './apps/*/package.json'],
files: [
'./package.json',
'./packages/*/package.json',
'./apps/*/package.json',
],
};
Loading

0 comments on commit a699d61

Please sign in to comment.