Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/monster1935/vue-ghpages-test
测试gh-pages包的自动化发布
https://github.com/monster1935/vue-ghpages-test
Last synced: 2 months ago
JSON representation
测试gh-pages包的自动化发布
- Host: GitHub
- URL: https://github.com/monster1935/vue-ghpages-test
- Owner: monster1935
- Created: 2018-01-16T08:27:33.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2018-01-16T09:17:21.000Z (almost 7 years ago)
- Last Synced: 2023-11-25T12:28:03.333Z (about 1 year ago)
- Language: JavaScript
- Size: 253 KB
- Stars: 6
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## vue-ghpages-test
> 测试gh-pages包的自动化发布
## how to use
1. 工程下安装gh-pages的包 `npm install gh-pages --save`
2. package.json 文件中配置npm scripts```bash
"scripts": {
"dev": "webpack-dev-server --inline --progress --config build/webpack.dev.conf.js",
"start": "npm run dev",
"build": "node build/build.js",
"deploy": "gh-pages -d dist" ## 添加部署选项
},
```3. vue 项目执行 `npm run build` 生成打包后的文件,**注意**发布到github gh-pages分支的话需要保证打包路径,也就是修改 config/index.js 中的 build对象的assetsPublicPath: './'
4. 执行 `npm run deploy` 命令,输入github 帐号密码,开始部署。
## 关于gh-pages 包
[gh-pages](https://github.com/tschaub/gh-pages)