WEB STUDY/ETC.
etc. gh-pages 패키지
thisisyjin
2022. 2. 19. 17:17
1 / gh-pages 패키지 설치
npm i gh-pages
2 / package.json 수정
,
"homepage": "https://thisisyjin.github.io/ReactJSPractice"
끝부분에 이렇게 추가하고,
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject",
"deploy": "gh-pages -d build", ❗❗
"predeploy": "npm run build" ❗❗
},
scripts 부분에 deploy와 predeploy 를 추가함.
3 / 터미널에 npm run deploy 입력
> project@0.1.0 predeploy
> npm run build
> project@0.1.0 build
> react-scripts build
https://thisisyjin.github.io/디렉토리명
위 페이지로 접속하면 끝