使用angular-cli-ghpages部署Angular应用到GitHub
2017-10-16 23:07
573 查看
GitHub有一个很实用的功能就是GitHub Pages,他相当于为Github项目建立了一个可视化的web页面。
首先新建一个Github空项目,比如angular-deploy
然后使用angular-cli工具生成一个新项目
安装angular-cli-ghpages包
打包项目代码,并设置项目链接地址
初始化git
angular-cli-ghpages的功能就与这个类似。
首先新建一个Github空项目,比如angular-deploy
然后使用angular-cli工具生成一个新项目
安装angular-cli-ghpages包
npm install angular-cli-ghpages -g
打包项目代码,并设置项目链接地址
ng build --prod --base-href "https://justforuse.github.io/angular-deploy/"
初始化git
git init git remote add origin https://github.com/justforuse/angular-deploy.git[/code]
发布(默认push到gh-pages分支上)ngh
示例地址:https://github.com/justforuse/angular-deploy
参考连接:https://coursetro.com/posts/code/64/How-to-Deploy-an-Angular-App-(Angular-4)
相关文章推荐
- 在github pages上部署Angular
- 使用hexo时deploy部署网站到github或gitcafe的gitpages时重复输入用户名密码的解决办法
- Angular-Cli+nginx使用gzip static再次加快应用访问速度!!!
- 使用Angular-cli搭建Angular Material 2应用示例
- 详解使用angular-cli发布i18n多国语言Angular应用
- 使用GitHub pages + Hexo 快速搭建个性化博客(一)-部署Hexo默认blog模板至远程GitHub
- Angular-Cli+nginx使用gzip static再次加快应用访问速度!!!
- 如何使用 Hexo && 部署至GitHub Pages [tags] [翻译]
- vue-cli项目以及普通静态网页如何部署到github pages
- 使用jBPM开发企业流程应用之在Tomcat上部署流程引擎及控制台
- Java桌面应用安装部署、安装程序制作(exe4j + Inno Setup)——之四:使用Inno Setup制作安装包
- Java桌面应用安装部署、安装程序制作(exe4j + Inno Setup)——之三:使用exe4j生成EXE可执行文件
- Jrebel 的配置及使用(实现WEB应用的热部署)
- 使用 Apache OpenJPA 开发 EJB 3.0 应用,第 8 部分: 在 Java EE 环境下开发、部署 OpenJPA 应用
- 使用Java Web Start部署JRuby应用
- 利用GitHub Pages安装部署Octopress博客
- AJAX应用-动态验证码的部署和使用
- 【CXF】使用CXF部署一个最简单的WebService应用
- 在WEB应用中使用mysql部署shiro安全框架
- SCA概念与应用实践(8.Tuscany中使用Domain Manager部署)