{
{
...
},
"homepage": "https://ivebeen8.github.io/react-for-beginners"
}
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject",
"deploy": "gh-pages - d build"
},
"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"
},
이렇게 해두면 build하지 않아도 npm run deploy라고 입력했을때, 자동으로 predeploy가 실행되고, 그안에 있는 명령어 build가 되면서 앱이 최적화된다. 다음 deploy 명령어가 실행되면서 build파일이 git에 자동으로 업로드 된다.
그리고 생성된 주소로 가게된다면, 페이지가 만들어 진걸 알 수 있다! 요-!