shannonmoeller / gulp-hb

A sane Gulp plugin to compile Handlebars templates. Useful as a static site generator.

Home Page:http://npm.im/gulp-hb

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Can't include partials that start with new or data?

skeddles opened this issue · comments

This is a really weird bug, but I couldn't figure out why my partials weren't being found... if I make any partial that starts with the word new or data, they don't get picked up and added to the partials list (I'm using debug mode, and can see all the loaded partials).

My build looks like this:

function compile_page(){
    gulp.src(path.join('./views/index.hbs'))
		.pipe(include({includePaths: ['/svg']}))

        .pipe(handlebars({encoding: 'utf8', debug: true, bustCache: true})
            .partials('./views/[!index]*.hbs')
            //.helpers({ svg: hb_svg })
            .helpers('./helpers/**/*.js')
            .data({
                projectSlug: 'pixel-editor',
                title: 'Lospec Pixel Editor',
                layout: false,
            }))
        .pipe(rename('index.htm'))
        .pipe(gulp.dest(BUILDDIR));
}

So ./views/new-stuff.hbs and ./views/data-stuff.hbs will not show up in the list of partials (and not be loaded), but if I change the names to ./views/anew-stuff.hbs and ./views/sata-stuff.hbs, then they both get loaded fine.

Really weird.