如何将 Aurelia 部署到 GitHub Pages (gh-pages) [英] How to deploy Aurelia to GitHub Pages (gh-pages)

查看:29
本文介绍了如何将 Aurelia 部署到 GitHub Pages (gh-pages)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我还没有看到 Aurelia 在 GitHub 页面中运行的演示.我想知道某处是否有说明如何完成的要点或回购协议.

是否只是配置 gulp 的问题还是有其他解决方案?

解决方案

这里是使用 Aurelia 导航框架的解决方案以 aurelia-skeleton-navigation 的形式创建到您的组织中作为存储库的示例.

<块引用>

重要说明:这不是生产解决方案.这是为了展示如何使用使用 Gulp 的 Aurelia 存储库在 GitHub 页面中运行 Aurelia.建议阅读jspm 捆绑一个用于部署的 Aurelia 应用程序.

skeleton-navigation 的当前版本解压到 aurelia-skeleton-navigation 目录后,启动 git 命令行.>

gitnpm 命令行本地:

cd /aurelia-skeleton-navigation

git 初始化

git remote add origin git@github.com:yourorg/aurelia-skeleton-navigation.git

git fetch --all

git add *

git commit -m '初始提交'

git push origin master

git branch gh-pages

git checkout gh-pages

编辑.gitignore 并注释掉jspm_packagesdist 路径

node_modules# jspm_packagesbower_components.主意.DS_STORE#/dist

jspm 安装

npm install

gulp build

git add *

git commit -m '添加资源'

git push origin gh-pages

导航到您的存储库 GitHub 页面:
http://yourorg.github.io/aurelia-skeleton-navigation

在 GitHub 页面上更新应用

一旦您在 master 分支中对您的应用进行了更改,您就可以将这些更改合并到您的 gh-pages 中并发布:

  • git checkout gh-pages

  • git merge master

  • gulp build

  • git add *

  • git commit -m 'updates'

  • git push origin gh-pages

I haven't seen demos of Aurelia running in GitHub pages. I wonder if there's a gist or a repo somewhere that shows how it can be done.

Is it just a matter of configuring gulp or is there another solution?

解决方案

Here is the solution using the Aurelia navigation skeleton project as an example when created into your organization as a repository as aurelia-skeleton-navigation.

Important Note: This is NOT a production solution. This is for showing how to run Aurelia within GitHub pages using an Aurelia repository that uses Gulp. It is recommended to read about jspm bundling an Aurelia app for deployment.

Start a git command line after you unzip the current release of the skeleton-navigation into aurelia-skeleton-navigation directory.

Locally from a git and npm command line:

cd <path>/aurelia-skeleton-navigation

git init

git remote add origin git@github.com:yourorg/aurelia-skeleton-navigation.git

git fetch --all

git add *

git commit -m 'initial commit'

git push origin master

git branch gh-pages

git checkout gh-pages

edit .gitignore and comment out the jspm_packages and dist paths

node_modules
# jspm_packages
bower_components
.idea
.DS_STORE
# /dist

jspm install

npm install

gulp build

git add *

git commit -m 'adding resources'

git push origin gh-pages

Navigate to your repository GitHub page:
http://yourorg.github.io/aurelia-skeleton-navigation

Updating the app on GitHub Pages

Once you make changes to your app in the master branch, you can merge those changes into your gh-pages and publish:

  • git checkout gh-pages

  • git merge master

  • gulp build

  • git add *

  • git commit -m 'updates'

  • git push origin gh-pages

这篇关于如何将 Aurelia 部署到 GitHub Pages (gh-pages)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆