Watchout-Pedia
왓챠 클론코딩 프로젝트
Prerequisites
Getting Started
Installation
git clone https://github.com/chlee1001/watchout-pedia.git
cd watchout-pedia
yarn install
Directory Structure
.
├── config # webpack 설정
│ ├── paths.js
│ ├── webpack.common.js
│ ├── webpack.dev.js
│ └── webpack.prod.js
├── dist # 빌드 결과물
├── public
│ ├── favicon.ico
│ └── index.html
├── src
│ ├── apis # API 호출 파일 관리
│ ├── assets # 이미지, lottie json 등 asset 파일 관리
│ ├── components # 컴포넌트 관리
│ ├── constants # 상수 관리
│ ├── hooks # 커스텀 훅 관리
│ ├── pages # 페이지 관리
│ │ └── HomePage # 페이지 별 폴더 생성
│ │ └── index.tsx
│ └── styles # 스타일 관리
│ │ ├── global-styles.tsx
│ │ └── style.d.ts
├── types # 타입 관리
│ ├── App.tsx
│ ├── index.tsx
├── tsconfig.json # typescript 설정
├── tsconfig.paths.json # typescript path 설정
Development server
Webpack dev server runs at localhost:3001
.
yarn start
Production build
Build outputs are created in dist
.
yarn build
Features
- React: 18.2.0
- TypeScript
- webpack
- Babel
Dependencies
webpack
webpack
- Module and asset bundler.webpack-cli
- Command line interface for webpackwebpack-dev-server
- Development server for webpackwebpack-merge
- Simplify development/production configuration
Babel
@babel/core
- Transpile ES6+ to backwards compatible JavaScript@babel/preset-env
- Smart preset for Babel@babel/preset-react
- Babel preset for all React plugins@babel/preset-typescript
- Preset for TypeScript
Babel plugins
@babel/plugin-proposal-class-properties
- The compiler for next generation JavaScriptreact-refresh
- Implements the wiring necessary to integrate Fast Refresh into bundlers
Loaders
babel-loader
- Transpile files with Babel and webpackts-loader
- TypeScript loader for webpackcss-loader
- Resolve CSS importsstyle-loader
- Inject CSS into the DOM
Plugins
clean-webpack-plugin
- Remove/clean build folders@pmmmwh/react-refresh-webpack-plugin
- React Refresh Webpack Pluginmini-css-extract-plugin
- Extracts CSS file per JS file which contains CSShtml-webpack-plugin
- Generate HTML files from template
Linters
eslint
- Enforce styleguide across applicationeslint-config-airbnb
- Base JS styleguide of Airbnbeslint-config-airbnb-typescript
- Enhances Airbnb's ESLint config with TypeScript supporteslint-config-prettier
- Implement prettier ruleseslint-plugin-import
- Implement import ruleseslint-plugin-jsx-a11y
- Static AST checker for accessibility rules on JSX elementseslint-plugin-prettier
- Dependency for prettier usage with ESLinteslint-plugin-react
- React specific linting rules forESLint
eslint-plugin-react-hooks
- This ESLint plugin enforces the Rules of Hooksprettier
- code formatter
License
This project is licensed under the MIT License.