Skip to content

Commit

Permalink
add build template and serve
Browse files Browse the repository at this point in the history
  • Loading branch information
nakajmg committed Aug 16, 2015
1 parent d592347 commit a71c2eb
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 4 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
theme/
docs/
2 changes: 2 additions & 0 deletions aigis_config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
template: ./template
desst: ./docs
15 changes: 15 additions & 0 deletions gulpfile.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ sass = require "gulp-sass"
autoprefixer = require "gulp-autoprefixer"
minify = require "gulp-minify-css"
rename = require "gulp-rename"
aigis = require "gulp-aigis"
bs = require "browser-sync"

src = [
"src/**/*.scss"
Expand Down Expand Up @@ -43,6 +45,19 @@ gulp.task "build", ->
path.extname = ".min.css"
.pipe gulp.dest(dist)

gulp.task "template", ->
gulp.src "aigis_config.yml"
.pipe(aigis())

gulp.task "serve", ["template"], ->
bs.init(
server:
baseDir: ["./docs"]
directory: true
notify: false,
host: "localhost"
)

gulp.task "watch", ->
gulp.watch src, ["sass"]

Expand Down
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,10 @@
"watch": "gulp watch"
},
"devDependencies": {
"browser-sync": "^2.8.2",
"coffee-script": "^1.9.3",
"gulp": "^3.9.0",
"gulp-aigis": "pxgrid/gulp-aigis",
"gulp-autoprefixer": "^2.3.1",
"gulp-minify-css": "^1.2.0",
"gulp-notify": "^2.2.0",
Expand Down
2 changes: 1 addition & 1 deletion template/header.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<link href="{{root}}doc_assets/css/highlight/{{config.highlight_theme}}.css" rel="stylesheet">
<link href="{{root}}doc_assets/css/base.css" rel="stylesheet">
<link href="{{root}}doc_assets/css/theme.css" rel="stylesheet">
</head>
<body>
<!-- <header class="aigis-header"><a href="{{root}}index.html">{{config.name}}</a></header> -->
Expand Down
10 changes: 7 additions & 3 deletions template/sidemenu.hbs
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
<div class="aigis-sidemenu">
<header class="aigis-header"><a href="{{root}}index.html">{{config.name}}</a></header>
<header class="aigis-header">
<a href="{{root}}index.html">{{config.name}}</a>
</header>
<h2 class="aigis-sidemenu__heading"><a href="{{root}}color.html">Color</a></h2>
{{#if category}}
<h2 class="aigis-sidemenu__heading">Category</h2>
<nav class="aigis-categoryList">
{{#each category}}
<a class="aigis-categoryList__item" data-path-level="{{level}}" data-path-root="{{root}}" data-path-parent="{{parent}}" href="{{href}}"><span class="opener"></span>{{name}}</a>
<a class="aigis-categoryList__item" data-path-level="{{level}}" data-path-root="{{root}}" data-path-parent="{{parent}}" href="{{href}}">
<span class="opener"></span>{{name}}
</a>
{{/each}}
</nav>
{{/if}}
Expand All @@ -14,7 +18,7 @@
<h2 class="aigis-sidemenu__heading">Tag</h2>
<nav class="aigis-tags aigis-tagList">
{{#each tag}}
<a class="aigis-tags__item aigis-tags__item--{{name}}" href="{{href}}">{{name}}</a>
<a class="aigis-tags__item aigis-tags__item--{{name}}" href="{{href}}">{{name}}</a>
{{/each}}
</nav>
{{/if}}
Expand Down

0 comments on commit a71c2eb

Please sign in to comment.