vue-cli로 프로젝트를 만들고 github 페이지에 게시
                                            
                                                
                                                
                                                
                                                
                                                
                                                 4006 단어  vue-cligithub-pages
                    
절차
 vue-cli 설치 (처음에만)
$ npm install -g vue-cli
 프로젝트 이름을 변수로 설정
PJNAME=vuetes
 프로젝트 만들기
모든 질문은 ENTER에서 OK
$ vue init webpack ${PJNAME}
$ cd ${PJNAME}
 js와 css를 상대 경로로 얻도록 변경
build 내의 assetsPublicPath 수정
config/index.jsbuild: {
  :
  assetsPublicPath: '/',
  :
↓
config/index.jsbuild: {
  :
  assetsPublicPath: '',
  :
 github pages에 배포를 단순화하는 플러그인 추가
$ npm install gh-pages --save-dev
 package.json 수정
스크립트에 deploy 추가
package.json"scripts": {
    "deploy": "gh-pages -d dist",
    :
}
 커밋하다
$ git init
$ git add -A
$ git commit -m "commit"
 github에서 저장소를 만들고 푸시하기
$ REPO=$(basename $PWD);
$ GHUSER=$(git config --get user.name);
$ GHPASS=githubパスワードを入力
$ curl -u $GHUSER:$GHPASS https://api.github.com/user/repos -d '{"name":"'$REPO'"}' --fail;
$ git remote add origin [email protected]:$GHUSER/$REPO.git;
$ git push origin master
 github pages에 배포
$ npm run build
$ npm run deploy
 동작 확인
$ open https://yfujii01.github.io/${PJNAME}/
↓ 이것이 나오면 성공
  
                
                    
        
    
    
    
    
    
                
                
                
                
                    
                        
                            
                            
                            Reference
                            
                            이 문제에 관하여(vue-cli로 프로젝트를 만들고 github 페이지에 게시), 우리는 이곳에서 더 많은 자료를 발견하고 링크를 클릭하여 보았다
                                
                                https://qiita.com/yfujii01/items/7e32b90f554c32745b54
                            
                            
                            
                                텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
                            
                            
                                
                                
                                 우수한 개발자 콘텐츠 발견에 전념
                                (Collection and Share based on the CC Protocol.)
                                
                                
                                우수한 개발자 콘텐츠 발견에 전념
                                (Collection and Share based on the CC Protocol.)
                            
                            
                        
                    
                
                
                
            
$ npm install -g vue-cli
PJNAME=vuetes
$ vue init webpack ${PJNAME}
$ cd ${PJNAME}
build: {
  :
  assetsPublicPath: '/',
  :
build: {
  :
  assetsPublicPath: '',
  :
$ npm install gh-pages --save-dev
"scripts": {
    "deploy": "gh-pages -d dist",
    :
}
$ git init
$ git add -A
$ git commit -m "commit"
$ REPO=$(basename $PWD);
$ GHUSER=$(git config --get user.name);
$ GHPASS=githubパスワードを入力
$ curl -u $GHUSER:$GHPASS https://api.github.com/user/repos -d '{"name":"'$REPO'"}' --fail;
$ git remote add origin [email protected]:$GHUSER/$REPO.git;
$ git push origin master
$ npm run build
$ npm run deploy
$ open https://yfujii01.github.io/${PJNAME}/
Reference
이 문제에 관하여(vue-cli로 프로젝트를 만들고 github 페이지에 게시), 우리는 이곳에서 더 많은 자료를 발견하고 링크를 클릭하여 보았다 https://qiita.com/yfujii01/items/7e32b90f554c32745b54텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
                                
                                
                                
                                
                                
                                우수한 개발자 콘텐츠 발견에 전념
                                (Collection and Share based on the CC Protocol.)