react.js + typescirpt 시작하기+ gh-pages

이득규·2022년 4월 3일
0

react.js

목록 보기
1/1

react-app + typescript 설치

	npx create-react-app [app-name] --template typescript 

npm start시 프로젝트 시작

github 베포 페이지 설정

	npm install gh-pages

설치 후 package.json 의 scripts 란에 명령어,homepage url 설정

	"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"
  },

아래에 추가적으로 페이지 url 설정

"homepage": "https://[githubId].github.io/[repository_name]"

git 에 업데이트 후 npm deploy 명령어로 항상 업데이트 해줘야 합니다.

ex) https://silent10z.github.io/dkguelee/

profile
끄적 끄적

0개의 댓글