- 테스트
이 프로젝트에는 이제까지 다뤘던 라이브러리들이 모두 설치되어 있습니다. 팀 프로젝트의 기반 코드로 사용할 수 있습니다.
이 프로젝트에는 semantic-ui-css
가 포함되어 있기 때문에 별도의 CSS 리셋을 적용하실 필요가 없습니다. Semantic UI를 삭제하고 싶으시면 아래와 같이 해 주세요.
npm uninstall semantic-ui-css semantic-ui-react
실행/src/index.js
와/.storybook/config.js
에서semantic-ui-css
import 구문 삭제
- git clone
- Examples:
[FEAT]_
기능추가 함[FIX]_
수정사항 관련 이것저것 수정함
git flow init
을 먼저 합니다.git flow feature start [브런치명]
으로 브런치 생성git flow feature finish [브런치명]
으로 develop 브런치 병합 및 feature 브런치 삭제- 항상 현재
브런치
의 위치를 확인하기 - 모르겠으면 무조건
add
,commit
하기 - 개별로
add
,commit
하기
- master : 최종
- develop : 최종전
- feature : 기능별(개인)
git branch
- 현재 branch가 뜬다. 로컬에 가지고 있는 branch가 무엇이 있는지 볼 수 있다.git branch -r
: remote 저장소에 있는 branch를 보여줌git branch -a
: remote 저장소와 내 로컬에 있는 branch를 한 꺼번에 보고 싶을 때git branch '새로 만들 branch의 이름'
: git branch 만들기git checkout (갈아타고 싶은 branch의 이름)
: 브런치 이동하기git merge
:일단 보여주고 머지하기!!!!!!!!!!!
create-react-app
으로 만들어진 프로젝트는 자체적인 환경변수 사용법을 가지고 있습니다.
- 여러 종류의 환경변수 설정 파일을 사용할 수 있습니다. 보통의 경우
.env.local
을 사용하면 됩니다. - 환경변수 이름은 반드시
REACT_APP_
으로 시작해야 합니다.
새로 만든 프로젝트를 지금 보고 계신 프로젝트와 똑같이 설정하시려면 아래의 내용을 따라하시면 됩니다.
npx create-react-app <my-project-name>
cd <my-project-name>
https://gist.github.com/seungha-kim/bdfa171962362f9308e5264766100dbe
npm install axios classnames node-sass react-helmet semantic-ui-css semantic-ui-react react-router-dom
터미널에서 아래 명령 실행
npx -p @storybook/cli sb init
npm install --save-dev storybook-react-router
.storybook/config.js
내용 수정 (공식 문서 링크)
import { configure } from '@storybook/react';
const req = require.context('../src/components', true, /\.stories\.js$/);
function loadStories() {
req.keys().forEach(filename => req(filename));
}
configure(loadStories, module);
스토리북에서 <Link />
컴포넌트 사용할 수 있도록 설정하기 (공식 문서 링크)
// .storybook/config.js
import { configure, addDecorator } from '@storybook/react';
import StoryRouter from 'storybook-react-router';
addDecorator(StoryRouter());