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

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

问题描述

我还没有在GitHub网页上看过 Aurelia 的演示。我想知道是否有一个主意或回购的地方,表明它可以做到。

只是配置 gulp 或者是否有其他解决方案?

解决方案

以下是使用 Aurelia导航框架的解决方案项目作为示例创建到您的组织中作为 aurelia-skeleton-navigation 的存储库。
$ b


重要说明:这不是生产解决方案。这是为了演示如何使用使用 Gulp 的Aurelia存储库在GitHub页面中运行Aurelia。建议阅读有关 jspm bundling Aurelia应用程序的部署。


将当前版本的 skeleton-navigation 解压缩到 aurelia中后,启动 git 命令行



本地从 git npm 命令行:

cd<路径> / 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'初始提交'



git push origin master



git分支gh-pages



git checkout gh-pages



编辑。 gitignore 并注释掉 jspm_包 dist 路径

  node_modules 
#jspm_packages
bower_components
.idea
.DS_STORE
#/ dist

jspm install



npm install






$ b $ p code> 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 code>


  • gulp build

    b
  • git add *


  • m'updates'


  • git push origin gh-pages p>



  • 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页面(gh-pages)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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