https://github.com/dl0312/react-typescript-boilerplate
πΆ νμ
μ€ν¬λ¦½νΈμ ν¨κ» 리μ‘νΈ μ±μ λ§λ€κΈ° μν μ΅κ³ μ λ°©λ²!
https://github.com/dl0312/react-typescript-boilerplate
boilerplate create-react-app-typescript react redux styled-components typescript
Last synced: 7 months ago
JSON representation
πΆ νμ μ€ν¬λ¦½νΈμ ν¨κ» 리μ‘νΈ μ±μ λ§λ€κΈ° μν μ΅κ³ μ λ°©λ²!
- Host: GitHub
- URL: https://github.com/dl0312/react-typescript-boilerplate
- Owner: dl0312
- Created: 2019-02-19T09:07:05.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2021-09-16T14:55:06.000Z (about 4 years ago)
- Last Synced: 2025-03-31T01:41:17.363Z (9 months ago)
- Topics: boilerplate, create-react-app-typescript, react, redux, styled-components, typescript
- Language: TypeScript
- Homepage:
- Size: 704 KB
- Stars: 18
- Watchers: 0
- Forks: 5
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# π Frontend Boilerplate with React, TypeScript
리μ‘νΈ μ±μ μ²μλΆν° λ§λ€κΈ° μν μ΅κ³ μ λ°©λ²!
## π λΌμ΄λΈλ¬λ¦¬
| λΌμ΄λΈλ¬λ¦¬ | λ²μ |
| ------------------------ | ---------- |
| react (with π£**Hooks**) | **^16.11** |
| react-dom | **^16.11** |
| react-router | **^5.1** |
| react-scripts | **3.3** |
| styled-components | **^4.4** |
| typescript | **3.6** |
| antd | **4.1.5** |
## π§ μ€μ νμΌλ€
### π title
νμ΄ν μμ μ μν΄μλ [index.html](/public/index.html)μμ νμ¬ `React-TypeScript-Boilerplate`λ‘ λμ΄μλ λΆλΆλ€μ κ³ μ³μΌν©λλ€.
```html
```
```html
React-TypeScript-Boilerplate
```
### π¦ favicon
νλΉμ½ μμ μ μν΄μλ [asset](/public/asset)μ μλ κΈ°μ‘΄μ μ΄λ―Έμ§ νμΌλ€μ λ체ν΄μΌν©λλ€. (νμ¬λ π¦ μ΄λͺ¨μ§λ‘ λμ΄μμ΅λλ€.)
[FAVIC-O-MATIC](https://favicomatic.com/)μ μ μνμ¬ `Every damm size,sir!`λ₯Ό μ ννκ³ `Upload Your Image` λ²νΌμ ν΄λ¦νμ¬ νμν μ΄λ―Έμ§ νμΌμ΄ λ€μ΄μλ μμΆνμΌμ λ°μ΅λλ€.
### π .eslintrc.json
```json
{
"extends": [
"eslint:recommended",
"plugin:react/recommended",
"plugin:@typescript-eslint/recommended",
"prettier/@typescript-eslint",
"plugin:prettier/recommended"
],
"plugins": ["react", "@typescript-eslint", "prettier"],
"env": {
"browser": true,
"jasmine": true,
"jest": true
},
"settings": {
"react": {
"pragma": "React",
"version": "detect"
}
},
"parser": "@typescript-eslint/parser"
}
```
### π tsconfig.json
`tsconfig.json`μλ `TypeScript`μ [μ»΄νμΌλ¬ μ΅μ
](https://typescript-kr.github.io/pages/compiler-options.html)μ΄ μ μλμ΄ μμ΅λλ€.
λ€μ 컀맨λλ₯Ό ν΅ν΄ κ°μ₯ κΈ°λ³Έμ μΈ `tsconfig.json`λ₯Ό μμ±ν μ μμ΅λλ€.
```shell
$ npx tsc --init
```
ν΄λΉ νλ‘μ νΈμμλ κΈ°λ³Έ μ΅μ
μμ μμ λ `tsconfig.json`λ₯Ό μ¬μ©ν©λλ€.
```json
{
"compilerOptions": {
"target": "es5",
"lib": ["dom", "dom.iterable", "esnext"],
"noImplicitAny": false,
"allowJs": true,
"skipLibCheck": true,
"esModuleInterop": true,
"allowSyntheticDefaultImports": true,
"strict": true,
"forceConsistentCasingInFileNames": true,
"module": "esnext",
"moduleResolution": "node",
"resolveJsonModule": true,
"isolatedModules": true,
"noEmit": true,
"jsx": "react"
},
"include": ["src"]
}
```
### π tslint.json
```json
{
"defaultSeverity": "error",
"extends": ["tslint:recommended"],
"jsRules": {},
"rules": {
"quotemark": false,
"ordered-imports": false,
"object-literal-sort-keys": false,
"member-access": false
},
"rulesDirectory": []
}
```
### π .prettierrc
```json
{
"singleQuote": true,
"semi": true,
"useTabs": false,
"tabWidth": 2,
"trailingComma": "all",
"printWidth": 80,
"arrowParens": "always",
"orderedImports": true
}
```
## Installation
```
$ npm install
```
## Running
```
$ npm run start
```
## Build
```
$ npm run build
```
## Reference
- [CRA(Create React App)μ tslint, eslint, prettier μ μ©νκΈ°](https://milooy.wordpress.com/2019/09/21/cracreate-react-app%ec%97%90-tslint-eslint-prettier-%ec%a0%81%ec%9a%a9%ed%95%98%ea%b8%b0/comment-page-1/#comment-2044)
# License
MIT