Skip to content

πŸ‘Ά νƒ€μž…μŠ€ν¬λ¦½νŠΈμ™€ ν•¨κ»˜ λ¦¬μ•‘νŠΈ 앱을 λ§Œλ“€κΈ° μœ„ν•œ 졜고의 방법!

Notifications You must be signed in to change notification settings

dl0312/react-typescript-boilerplate

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

56 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🌌 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μ—μ„œ ν˜„μž¬ React-TypeScript-Boilerplate둜 λ˜μ–΄μžˆλŠ” 뢀뢄듀을 κ³ μ³μ•Όν•©λ‹ˆλ‹€.

<meta
  name="apple-mobile-web-app-title"
  content="React-TypeScript-Boilerplate"
/>
<title>React-TypeScript-Boilerplate</title>

🦞 favicon

νŒŒλΉ„μ½˜ μˆ˜μ •μ„ μœ„ν•΄μ„œλŠ” asset에 μžˆλŠ” 기쑴의 이미지 νŒŒμΌλ“€μ„ λŒ€μ²΄ν•΄μ•Όν•©λ‹ˆλ‹€. (ν˜„μž¬λŠ” 🦞 이λͺ¨μ§€λ‘œ λ˜μ–΄μžˆμŠ΅λ‹ˆλ‹€.)

FAVIC-O-MATIC에 μ ‘μ†ν•˜μ—¬ Every damm size,sir!λ₯Ό μ„ νƒν•˜κ³  Upload Your Image λ²„νŠΌμ„ ν΄λ¦­ν•˜μ—¬ ν•„μš”ν•œ 이미지 파일이 λ“€μ–΄μžˆλŠ” μ••μΆ•νŒŒμΌμ„ λ°›μŠ΅λ‹ˆλ‹€.

πŸ“„ .eslintrc.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의 컴파일러 μ˜΅μ…˜μ΄ μ •μ˜λ˜μ–΄ μžˆμŠ΅λ‹ˆλ‹€.

λ‹€μŒ μ»€λ§¨λ“œλ₯Ό 톡해 κ°€μž₯ 기본적인 tsconfig.jsonλ₯Ό 생성할 수 μžˆμŠ΅λ‹ˆλ‹€.

$ npx tsc --init

ν•΄λ‹Ή ν”„λ‘œμ νŠΈμ—μ„œλŠ” κΈ°λ³Έ μ˜΅μ…˜μ—μ„œ μˆ˜μ •λœ tsconfig.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

{
  "defaultSeverity": "error",
  "extends": ["tslint:recommended"],
  "jsRules": {},
  "rules": {
    "quotemark": false,
    "ordered-imports": false,
    "object-literal-sort-keys": false,
    "member-access": false
  },
  "rulesDirectory": []
}

πŸ“„ .prettierrc

{
  "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

License

MIT

About

πŸ‘Ά νƒ€μž…μŠ€ν¬λ¦½νŠΈμ™€ ν•¨κ»˜ λ¦¬μ•‘νŠΈ 앱을 λ§Œλ“€κΈ° μœ„ν•œ 졜고의 방법!

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published