-
Notifications
You must be signed in to change notification settings - Fork 51
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
충남대 FE_박건민 1주차 과제 #96
Open
geonbur
wants to merge
16
commits into
kakao-tech-campus-2nd-step2:geonbur
Choose a base branch
from
geonbur:geonbur
base: geonbur
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
198ce5e
Feat: Typescript project setting
1d6eebf
Feat: 폴더 구성 & 절대경로를 위한 alias 설정
fe12d2b
Fear: ESLint & Prerrier Aitbnbn 룰 설정
7fa3818
Feat: emotion 추가 & reset.css 작업
9d4237f
Feat:emotion 추가 & reset.css 적용 (보완)
36c35d3
README 수정
7d0183b
docs: 피드백 반영한 REAME.md 수정
e3b6b0d
feat: Babel, carco 관련 설정 추가
3d73ec5
feat: Button 컴포넌트 & 스토리 추가
02494a0
feat: Input 컴포넌트 & 스토리 추가
7079bd5
feat: Image 컴포넌트 & 스토리 추가
a56990c
feat: GoodsItem 컴토넌트 & 스토리 추가
b7a2e0f
feat: Container 컴포넌트 & 스토리 추가
f5b82a3
fear: Grid 컴포넌트 & 스토리 추가
60fca98
chore: 기타 파일들 변경사항
d07d4ff
fix: lint 실행 오류 해결
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,47 @@ | ||
# react-gift-react-foundation | ||
|
||
FE 카카오 선물하기 1주차 과제: React 기초 | ||
|
||
- 1단계 | ||
|
||
1. CRA로 프로젝트 생성 (Typescript 기반) | ||
2. 절대경로를 위한 alias 설정 | ||
3. ESLint, Prettier를 추가 (Airbnb룰 적용) | ||
4. emotion 스타일 라이브러리 추가 & reset css적용 | ||
|
||
- 2단계 | ||
|
||
- 3단계 | ||
|
||
* 질문 1. webpack은 무엇이고 어떤 역할을 하고 있나요? | ||
웹 애플리케이션을 개발할 때 필요한 모듈 번들러입니다. 여러 개의 파일을 하나의 파일로 묶어주는 역할을 합니다. | ||
|
||
- 하나의 파일로 묶어주는 이유? | ||
1. 파일 크기를 줄일 수 있음(By. 압축, 난독화) | ||
2. 모듈화 가능. 결국에는 하나로 묶이기 때문. | ||
3. 모듈 의존성 관리 및 충돌방지 측면에서 용이함 | ||
|
||
* 질문 2. 브라우저는 어떻게 JSX 파일을 읽을 수 있나요? | ||
Babel과 같은 트랜스파일러가 필요합니다. JSX는 자바스크립트에서 확장된 문법이 적용되기 때문입니다. | ||
|
||
- Bable에서는 React.createElement를 활용하여 JSX를 JS파일로 변환합니다. | ||
|
||
* 질문 3. React에서 상태 변화가 생겼을 때 어떻게 변화를 알아챌 수 있나요? | ||
상태 초기화 (this.state) -> 상태 변경(this.setState) -> 자동으로 UI 업데이트 | ||
|
||
- 폴더구조 | ||
.storybook: Storybook 설정 파일 | ||
components | ||
Button: Button 컴포넌트 | ||
Container: Container 컴포넌트 | ||
GoodsItem: GoodsItem 컴포넌트 | ||
Grid: Grid 컴포넌트 | ||
Image: Image 컴포넌트 | ||
Input: Input 컴포넌트 | ||
stories: 컴포넌트들의 story입력을 위한 폴더 | ||
hooks: 커스텀 훅 | ||
pages: 페이지 컴포넌트를 위해 만들어 둠 | ||
styles: 스타일, 테마 관련 파일을 위한 폴더 | ||
GlobalStyles.tsx: 전역 스타일 설정 파일 | ||
reset.css: CSS 리셋 파일 | ||
utils: 유틸리티 함수를 위해 만들어 둠 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
node_modules/ | ||
build/ | ||
dist/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
{ | ||
"settings": { | ||
"react": { | ||
"version": "detect", | ||
}, | ||
}, | ||
|
||
"extends": [ | ||
"eslint:recommended", | ||
"plugin:react/recommended", | ||
"plugin:@typescript-eslint/recommended", | ||
"plugin:prettier/recommended", | ||
], | ||
"plugins": ["prettier"], | ||
|
||
"rules": { | ||
"prettier/prettier": [ | ||
"error", | ||
{ | ||
"endOfLine": "auto", | ||
}, | ||
], | ||
"react/react-in-jsx-scope": "off", | ||
"react/jsx-filename-extension": [1, { "extensions": [".js", ".jsx", ".ts", ".tsx"] }], | ||
}, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. | ||
|
||
# dependencies | ||
/node_modules | ||
/.pnp | ||
.pnp.js | ||
|
||
# testing | ||
/coverage | ||
|
||
# production | ||
/build | ||
|
||
# misc | ||
.DS_Store | ||
.env.local | ||
.env.development.local | ||
.env.test.local | ||
.env.production.local | ||
|
||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
|
||
*storybook.log |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
node_modules/ | ||
build/ | ||
dist/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"singleQuote": true, | ||
"trailingComma": "all", | ||
"printWidth": 100, | ||
"tabWidth": 2, | ||
"semi": true, | ||
"endOfLine": "lf" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import type { StorybookConfig } from '@storybook/react-webpack5'; | ||
|
||
const config: StorybookConfig = { | ||
stories: ['../src/**/*.mdx', '../src/**/*.stories.@(js|jsx|mjs|ts|tsx)'], | ||
addons: [ | ||
'@storybook/preset-create-react-app', | ||
'@storybook/addon-onboarding', | ||
'@storybook/addon-links', | ||
'@storybook/addon-essentials', | ||
'@chromatic-com/storybook', | ||
'@storybook/addon-interactions', | ||
], | ||
framework: { | ||
name: '@storybook/react-webpack5', | ||
options: {}, | ||
}, | ||
staticDirs: ['..\\public'], | ||
}; | ||
export default config; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import type { Preview } from '@storybook/react'; | ||
|
||
const preview: Preview = { | ||
parameters: { | ||
controls: { | ||
matchers: { | ||
color: /(background|color)$/i, | ||
date: /Date$/i, | ||
}, | ||
}, | ||
}, | ||
}; | ||
|
||
export default preview; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"editor.formatOnSave": true, | ||
"editor.defaultFormatter": "esbenp.prettier-vscode", | ||
"eslint.alwaysShowStatus": true, | ||
"editor.codeActionsOnSave": { | ||
"source.fixAll.eslint": true | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
# Getting Started with Create React App | ||
|
||
This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app). | ||
|
||
## Available Scripts | ||
|
||
In the project directory, you can run: | ||
|
||
### `npm start` | ||
|
||
Runs the app in the development mode.\ | ||
Open [http://localhost:3000](http://localhost:3000) to view it in the browser. | ||
|
||
The page will reload if you make edits.\ | ||
You will also see any lint errors in the console. | ||
|
||
### `npm test` | ||
|
||
Launches the test runner in the interactive watch mode.\ | ||
See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information. | ||
|
||
### `npm run build` | ||
|
||
Builds the app for production to the `build` folder.\ | ||
It correctly bundles React in production mode and optimizes the build for the best performance. | ||
|
||
The build is minified and the filenames include the hashes.\ | ||
Your app is ready to be deployed! | ||
|
||
See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information. | ||
|
||
### `npm run eject` | ||
|
||
**Note: this is a one-way operation. Once you `eject`, you can’t go back!** | ||
|
||
If you aren’t satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project. | ||
|
||
Instead, it will copy all the configuration files and the transitive dependencies (webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point you’re on your own. | ||
|
||
You don’t have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldn’t feel obligated to use this feature. However we understand that this tool wouldn’t be useful if you couldn’t customize it when you are ready for it. | ||
|
||
## Learn More | ||
|
||
You can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started). | ||
|
||
To learn React, check out the [React documentation](https://reactjs.org/). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"presets": ["@babel/preset-env", "@babel/preset-react", "@babel/preset-typescript"] | ||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
path 인식을 하지 못해서 오류가 발생하고 있네요.