This commit is contained in:
Pan 2018-07-12 12:44:53 +08:00
parent 77cb6b1f43
commit 700cc822cd
2 changed files with 24 additions and 1 deletions

22
deploy.sh Normal file
View File

@ -0,0 +1,22 @@
#!/usr/bin/env sh
# abort on errors
set -e
# build
npm run build:prod
# navigate into the build output directory
cd dist
# if you are deploying to a custom domain
# echo 'www.example.com' > CNAME
git init
git add -A
git commit -m 'deploy'
# if you are deploying to https://<USERNAME>.github.io/<REPO>
git push -f git@github.com:PanJiaChen/vue-element-admin.git master:gh-pages
cd -

View File

@ -10,7 +10,8 @@
"build:sit": "cross-env NODE_ENV=production env_config=sit node build/build.js",
"lint": "eslint --ext .js,.vue src",
"test": "npm run lint",
"precommit": "lint-staged"
"precommit": "lint-staged",
"deploy": "bash deploy.sh"
},
"lint-staged": {
"src/**/*.{js,vue}": [