Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/wiredep #16

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .bowerrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"directory": "template/public/components"
}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
.DS_Store
node_modules/
npm-debug.log
template/public/components
107 changes: 107 additions & 0 deletions .templates/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<title>kss-node Styleguide</title>
<meta name="description" content="" />
<meta name="generator" content="kss-node" />
<link rel="stylesheet" href="public/kss.css" />
{{{styles}}}
<!--[if lt IE 9]>
<script src="public/html5shiv.js"></script>
<![endif]-->
</head>
<body id="kss-node">
<div class="kss-wrapper">
<div class="kss-sidebar">
<div class="kss-sidebar-inner">
<header class="kss-header">
<h1 class="kss-doc-title"><a href="./">kss-node Styleguide</a></h1>
</header>
<nav class="kss-nav">
<ul class="kss-menu" data-kss-ref="{{rootName}}">
<li class="kss-menu-item"><a href="./"><span class="kss-ref">0</span><span class="kss-name">Overview</span></a></li>
{{#eachRoot}}
<li class="kss-menu-item"><a href="section-{{reference}}.html"><span class="kss-ref">{{reference}}</span><span class="kss-name">{{header}}</span></a></li>
{{/eachRoot}}
</ul>
{{#if homepage}}
{{else}}
<ul class="kss-menu-child">
{{#eachSection rootName}}
{{#ifDepth 1}}
{{else}}
<li class="kss-menu-item"><a href="#section-{{reference}}"><span class="kss-ref">{{reference}}</span><span class="kss-name">{{header}}</span></a></li>
{{/ifDepth}}
{{/eachSection}}
</ul>
{{/if}}
</nav>
</div>
</div>
<div class="kss-content">
<article class="kss-article">
{{#if homepage}}
<section id="section-0" class="kss-section kss-overview">
{{{homepage}}}
</section>
{{else}}
{{#eachSection rootName}}
<section id="section-{{reference}}" class="kss-section kss-depth-{{depth}}">
<h1 class="kss-title"><span class="kss-ref">{{reference}}</span> {{header}}</h1>
{{#if markup}}
{{#if description}}
<div class="kss-description">
{{{description}}}
</div>
{{/if}}
<div class="kss-modifier-block">
<div class="kss-modifier kss-modifier-original">
<div class="kss-modifier-example">
{{{markup}}}
</div>
</div>
{{#eachModifier}}
<div class="kss-modifier">
<div class="kss-modifier-head">
<div class="kss-modifier-name">{{name}}</div>
<div class="kss-modifier-description">
{{{description}}}
</div>
</div>
<div class="kss-modifier-example">
{{{markup}}}
</div>
</div>
{{/eachModifier}}
<div class="kss-markup">
<pre><code class="lang-html">{{markup}}</code></pre>
</div>
</div>
{{else}}
{{#if description}}
<div class="kss-description">
{{{description}}}
</div>
{{/if}}
{{/if}}
</section>
{{/eachSection}}
{{/if}}
</article>
<footer class="kss-footer">
<div>Created using <a href="https://github.com/kss-node/kss-node">kss-node</a> and <a href="https://github.com/htanjo/kss-node-template">kss-node-template</a>.</div>
</footer>
</div>
</div>
<script src="public/kss.js"></script>
<!-- bower:js -->
<!-- endbower -->
<!--[if gt IE 8]><!-->
<script src="public/highlight.pack.js"></script>
<!--<![endif]-->
<script src="public/main.js"></script>
{{{scripts}}}
</body>
</html>
20 changes: 20 additions & 0 deletions bower.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"name": "kss-node-template",
"version": "0.1.5",
"homepage": "https://github.com/izifortune/kss-node-template",
"authors": [
"Hiroyuki Tanjo"
],
"license": "MIT",
"ignore": [
"**/.*",
"node_modules",
"bower_components",
"app/bower_components",
"test",
"tests"
],
"dependencies": {
"jquery": "~2.1.4"
}
}
12 changes: 12 additions & 0 deletions gulpfile.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
"use strict";

var gulp = require('gulp'),
wiredep = require('wiredep').stream;

gulp.task('bower', function () {
gulp.src('./.templates/index.html')
.pipe(wiredep({ignorePath: '../template/'}))
.pipe(gulp.dest('./template'));
});

gulp.task('default', ['bower']);
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,9 @@
"build": "npm run build:css && npm run build:demo"
},
"devDependencies": {
"gulp": "^3.9.0",
"kss": "^2.0.2",
"less": "^2.5.3"
"less": "^2.5.3",
"wiredep": "^2.2.2"
}
}
5 changes: 4 additions & 1 deletion template/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,10 @@ <h1 class="kss-title"><span class="kss-ref">{{reference}}</span> {{header}}</h1>
</div>
</div>
<script src="public/kss.js"></script>
<script src="public/jquery-1.9.1.min.js"></script>
<!-- bower:js -->
<script src="public/components/jquery/dist/jquery.js"></script>
<script src="public/components/clipboard/dist/clipboard.js"></script>
<!-- endbower -->
<!--[if gt IE 8]><!-->
<script src="public/highlight.pack.js"></script>
<!--<![endif]-->
Expand Down