gulp-hb icon indicating copy to clipboard operation
gulp-hb copied to clipboard

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

Open skeddles opened this issue 2 years ago • 0 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.

skeddles avatar Jul 06 '21 21:07 skeddles