shannonmoeller / gulp-hb

A sane Gulp plugin to compile Handlebars templates. Useful as a static site generator.
http://npm.im/gulp-hb
MIT License
147 stars 14 forks source link

Missing helper when function defined in gulpfile. #21

Closed andeersg closed 9 years ago

andeersg commented 9 years ago

Hi,

I have a problem when I try to define a helper inside the gulpfile:

gulp.task('test', function () {
    return gulp
        .src('pages/*.hbs')
        .pipe(hb({
            data: 'testing/*.{js,json}',
            helpers: {
              lower: function (text) {
                return String(text).toLowerCase();
              }
            },
            partials: 'partials/**/*.hbs'
        }))
        .pipe(extname())
        .pipe(gulp.dest('dist2/'));
});

If I run this I get the following error: Error: Missing helper: "lower".

Both partials and data works.

shannonmoeller commented 9 years ago

Well that's no good. Looks like there's an error in my tests that's allowing bleed-through from one test to another. I'm on it. Thanks!

shannonmoeller commented 9 years ago

Fixed and released as v2.6.0.

andeersg commented 9 years ago

Awesome :)