vue 글로벌 설치 및 노드 설치
vue 설치
$ vue create ${project_name}
git repository 설정 (public, 레포지토리 이름은 project_name 으로 설정)
git remote 와 연결
$ git init
$ git add README.md
$ git commit -m ":tada: First Commit"
$ git remote add origin https://github.com/`${user_name}`/`${project_name}`.git
$ git push -u origin master
Root 폴더에 vue.config.js 만들어 줌
$ touch vue.config.js
vue.config.js 에 publicPath, outputDir 설정
module.exports = {
publicPath: process.env.NODE_ENV === 'production'
? '/`${project_name}`/'
: '/',
outputDir: 'docs',
}
github repository -> settings -> GitHub Pages -> Source를 master/ docs 로 변경후 save
$ npm run build
$ git add . / git commit -m "${commit_contents}
" / git push
${user_name}
.github.io/${project_name}
/ 에서 App.js 확인 가능