From c40e90664e0b68c7e0286b906c8efe863b40cc1f Mon Sep 17 00:00:00 2001 From: Fabrizio Fortunato Date: Sat, 24 Oct 2015 11:58:29 +0100 Subject: [PATCH 1/2] added gulp and bower for automation on the template --- .bowerrc | 3 +++ .gitignore | 1 + bower.json | 17 +++++++++++++++++ package.json | 1 + 4 files changed, 22 insertions(+) create mode 100644 .bowerrc create mode 100644 bower.json diff --git a/.bowerrc b/.bowerrc new file mode 100644 index 0000000..cd3e91f --- /dev/null +++ b/.bowerrc @@ -0,0 +1,3 @@ +{ + "directory": "template/public/components" +} diff --git a/.gitignore b/.gitignore index 153216e..e3704f8 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ .DS_Store node_modules/ npm-debug.log +template/public/components diff --git a/bower.json b/bower.json new file mode 100644 index 0000000..c074c44 --- /dev/null +++ b/bower.json @@ -0,0 +1,17 @@ +{ + "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" + ] +} diff --git a/package.json b/package.json index fb08e1e..170c4d7 100644 --- a/package.json +++ b/package.json @@ -29,6 +29,7 @@ "build": "npm run build:css && npm run build:demo" }, "devDependencies": { + "gulp": "^3.9.0", "kss": "^2.0.2", "less": "^2.5.3" } From c9571f54d21b4738137637602213007ad6ce1c1f Mon Sep 17 00:00:00 2001 From: Fabrizio Fortunato Date: Sat, 24 Oct 2015 12:12:23 +0100 Subject: [PATCH 2/2] components coming from bower --- .templates/index.html | 107 ++++++++++++++++++++++++++++++++++++++++++ bower.json | 5 +- gulpfile.js | 12 +++++ package.json | 3 +- template/index.html | 5 +- 5 files changed, 129 insertions(+), 3 deletions(-) create mode 100644 .templates/index.html create mode 100644 gulpfile.js diff --git a/.templates/index.html b/.templates/index.html new file mode 100644 index 0000000..95e8278 --- /dev/null +++ b/.templates/index.html @@ -0,0 +1,107 @@ + + + + + + kss-node Styleguide + + + + {{{styles}}} + + + +
+
+
+
+

kss-node Styleguide

+
+ +
+
+
+
+ {{#if homepage}} +
+ {{{homepage}}} +
+ {{else}} + {{#eachSection rootName}} +
+

{{reference}} {{header}}

+ {{#if markup}} + {{#if description}} +
+ {{{description}}} +
+ {{/if}} +
+
+
+ {{{markup}}} +
+
+ {{#eachModifier}} +
+
+
{{name}}
+
+ {{{description}}} +
+
+
+ {{{markup}}} +
+
+ {{/eachModifier}} +
+
{{markup}}
+
+
+ {{else}} + {{#if description}} +
+ {{{description}}} +
+ {{/if}} + {{/if}} +
+ {{/eachSection}} + {{/if}} +
+ +
+
+ + + + + + + + {{{scripts}}} + + diff --git a/bower.json b/bower.json index c074c44..789d31d 100644 --- a/bower.json +++ b/bower.json @@ -13,5 +13,8 @@ "app/bower_components", "test", "tests" - ] + ], + "dependencies": { + "jquery": "~2.1.4" + } } diff --git a/gulpfile.js b/gulpfile.js new file mode 100644 index 0000000..772942f --- /dev/null +++ b/gulpfile.js @@ -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']); diff --git a/package.json b/package.json index 170c4d7..82eab1b 100644 --- a/package.json +++ b/package.json @@ -31,6 +31,7 @@ "devDependencies": { "gulp": "^3.9.0", "kss": "^2.0.2", - "less": "^2.5.3" + "less": "^2.5.3", + "wiredep": "^2.2.2" } } diff --git a/template/index.html b/template/index.html index 8bbbf28..affbfdd 100644 --- a/template/index.html +++ b/template/index.html @@ -96,7 +96,10 @@

{{reference}} {{header}}

- + + + +