Skip to content

Commit

Permalink
chore: 프로젝트 상세 세팅 (#5)
Browse files Browse the repository at this point in the history
* feat: eslint 세부설정

* feat: prettier 세부설정

* chore: 각 어플에서 실행할 수 있는 build, dev 스크립트 추가

* chore: packlint 의존성 추가

* chore: husky, lint-staged 의존성 및 스크립트 추가

* chore: commitlint 추가

* chore(custom): commitizen으로 커밋 템플릿 생성

* chore(common): 커밋 템플릿에 scope 추가

* init(ui): ui 프로젝트 생성

* fix(ui): header의 React import 코드 제거

* chore(common): husky pre push 훅 추가

* chore(common): pre push 실행 권한 부여

* chore(common): ui, shelter, volunteer 프로젝트에 chakra ui 의존성 추가
  • Loading branch information
DongjaJ authored Oct 30, 2023
1 parent 152a523 commit e0891c6
Show file tree
Hide file tree
Showing 38 changed files with 4,818 additions and 731 deletions.
4 changes: 4 additions & 0 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

pnpm commitlint --edit $1
5 changes: 5 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

pnpm lint
pnpm lint-staged
5 changes: 5 additions & 0 deletions .husky/pre-push
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

pnpm lint
pnpm build
3 changes: 3 additions & 0 deletions .lintstagedrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"*.{ts,tsx}": ["eslint --fix", "prettier --write"]
}
13 changes: 13 additions & 0 deletions .prettierrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
module.exports = {
tabWidth: 2,
printWidth: 100,
jsxBracketSameLine: false,
semi: true,
singleQuote: true,
trailingComma: 'all',
useTabs: false,
bracketSpacing: true,
arrowParens: 'always',
endOfLine: 'auto',
singleAttributePerLine: false,
};
4 changes: 0 additions & 4 deletions apps/docs/.eslintrc.cjs

This file was deleted.

15 changes: 0 additions & 15 deletions apps/docs/favicon.svg

This file was deleted.

13 changes: 0 additions & 13 deletions apps/docs/index.html

This file was deleted.

22 changes: 0 additions & 22 deletions apps/docs/package.json

This file was deleted.

1 change: 0 additions & 1 deletion apps/docs/public/vite.svg

This file was deleted.

20 changes: 0 additions & 20 deletions apps/docs/src/main.ts

This file was deleted.

97 changes: 0 additions & 97 deletions apps/docs/src/style.css

This file was deleted.

1 change: 0 additions & 1 deletion apps/docs/src/typescript.svg

This file was deleted.

1 change: 0 additions & 1 deletion apps/docs/src/vite-env.d.ts

This file was deleted.

4 changes: 0 additions & 4 deletions apps/docs/tsconfig.json

This file was deleted.

17 changes: 11 additions & 6 deletions apps/shelter/package.json
Original file line number Diff line number Diff line change
@@ -1,26 +1,31 @@
{
"name": "shelter",
"private": true,
"version": "0.0.0",
"private": true,
"type": "module",
"scripts": {
"dev": "vite",
"build": "tsc && vite build",
"dev": "vite",
"lint": "eslint \"src/**/*.ts\"",
"preview": "vite preview"
},
"dependencies": {
"@chakra-ui/react": "^2.8.1",
"@emotion/react": "^11.11.1",
"@emotion/styled": "^11.11.0",
"framer-motion": "^10.16.4",
"react": "^18.2.0",
"react-dom": "^18.2.0"
"react-dom": "^18.2.0",
"ui": "workspace:*"
},
"devDependencies": {
"@types/react": "^18.2.15",
"@types/react-dom": "^18.2.7",
"@vitejs/plugin-react": "^4.0.3",
"eslint": "^8.45.0",
"typescript": "^5.0.2",
"vite": "^4.4.5",
"eslint-config-custom": "workspace:*",
"tsconfig": "workspace:*"
"tsconfig": "workspace:*",
"typescript": "^5.0.2",
"vite": "^4.4.5"
}
}
11 changes: 8 additions & 3 deletions apps/shelter/src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
import { ChakraProvider } from '@chakra-ui/react';
import { CustomButton, Header } from 'ui';

export default function App() {
return (
<div>
<ChakraProvider>
<Header />
보호소 어플리케이션
</div>
)
<CustomButton />
</ChakraProvider>
);
}
17 changes: 11 additions & 6 deletions apps/volunteer/package.json
Original file line number Diff line number Diff line change
@@ -1,26 +1,31 @@
{
"name": "volunteer",
"private": true,
"version": "0.0.0",
"private": true,
"type": "module",
"scripts": {
"dev": "vite",
"build": "tsc && vite build",
"dev": "vite",
"lint": "eslint \"src/**/*.ts\"",
"preview": "vite preview"
},
"dependencies": {
"@chakra-ui/react": "^2.8.1",
"@emotion/react": "^11.11.1",
"@emotion/styled": "^11.11.0",
"framer-motion": "^10.16.4",
"react": "^18.2.0",
"react-dom": "^18.2.0"
"react-dom": "^18.2.0",
"ui": "workspace:*"
},
"devDependencies": {
"@types/react": "^18.2.15",
"@types/react-dom": "^18.2.7",
"@vitejs/plugin-react": "^4.0.3",
"eslint": "^8.45.0",
"typescript": "^5.0.2",
"vite": "^4.4.5",
"eslint-config-custom": "workspace:*",
"tsconfig": "workspace:*"
"tsconfig": "workspace:*",
"typescript": "^5.0.2",
"vite": "^4.4.5"
}
}
11 changes: 8 additions & 3 deletions apps/volunteer/src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
import { ChakraProvider } from '@chakra-ui/react';
import { CustomButton, Header } from 'ui';

export default function App() {
return (
<>
<ChakraProvider>
<Header />
봉사자 어플리케이션
</>
)
<CustomButton />
</ChakraProvider>
);
}
9 changes: 5 additions & 4 deletions apps/volunteer/src/main.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
import React from 'react'
import ReactDOM from 'react-dom/client'
import App from './App.tsx'
import React from 'react';
import ReactDOM from 'react-dom/client';

import App from './App.tsx';

ReactDOM.createRoot(document.getElementById('root')!).render(
<React.StrictMode>
<App />
</React.StrictMode>,
)
);
23 changes: 23 additions & 0 deletions commitlint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
module.exports = {
extends: ['@commitlint/config-conventional'],
rules: {
'type-enum': [
2,
'always',
[
'feat',
'fix',
'refactor',
'design',
'comment',
'style',
'test',
'chore',
'init',
'rename',
'remove',
'docs',
],
],
},
};
Loading

1 comment on commit e0891c6

@vercel
Copy link

@vercel vercel bot commented on e0891c6 Oct 30, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

anifriends-frontend-volunteer – ./apps/volunteer

anifriends-frontend-volunteer.vercel.app
anifriends-frontend-volunteer-dongja.vercel.app
anifriends-frontend-volunteer-git-main-dongja.vercel.app

Please sign in to comment.