PhilJ / gulp-kss

Gulp plugin for KSS (Knyle Style Sheets) documentation generation
50 stars 34 forks source link

Update hbs helpers to use the latest from kss-node #12

Closed davidtheclark closed 5 years ago

davidtheclark commented 9 years ago

The current Handlebars helpers file is outdated. It does not contain the helpers necessary to render a custom template started from kss-node --init, hence https://github.com/PhilJ/gulp-kss/issues/11.

It looks to me like this file was just a copy-paste job from a previous version of kss-node; so this pull request is simply another copy-paste job from the current version.

Using this new helpers file worked for me with the default template version that arrives with gulp-kss and also worked with a new custom template generated from kss-node --init.

RobLoach commented 9 years ago

This would be a good one to have.

vocino commented 9 years ago

Can we get this merged?

nickradford commented 9 years ago

:+1: Can we please merge this?

nielsboogaard commented 9 years ago

:+1: !

RobLoach commented 9 years ago

In other news, I've switched over to using gulp-exec and interacting directly with the kss-node binary. Much simpler to work with, and more up to date than using this bridge.

RobLoach commented 9 years ago

For those of you looking for that exec snippet:

Gulpfile.js

var gulp = require('gulp');
var exec = require('child_process').exec;
gulp.task('kss', function(cb){
  exec('npm run kss', function (err, stdout, stderr) {
    console.log(err);
    console.log(stdout);
    console.log(stderr);
  });
});

package.json

{
  "scripts": {
    "kss": "kss-node --config='kss-node.json'"
  }
}

kss-node.json

{
  "source": [
    "styles"
  ],
  "destination": "styleguide"
}