gulp-assemble
gulp-assemble copied to clipboard
Issue with multiple files with same name
| src |subfolder |____foo.hbs |__subfolder2 |____foo.hbs |
gulp.task('convert-hbs', function(){
return gulp.src('./src/**/*.hbs')
.pipe(gulpAssemble(assemble, {layout: 'default'}))
.pipe(gulp.dest(paths.build));
});
only renders "subfolder2 > foo.html". If give the files unique names they are both rendered.
try using
assemble.option('renameKey', function(fp) {
// whatever logic you need for renaming template keys
return fp;
});
there are a few other issues about this already. object keys must be unique in javascript - we've considered using an id for lookups, or full filepaths, but that also effects how partials are used, or how templates reference one another.
we are about to release some improvements to renameKey, in the meantime any ideas are very welcome. we'd love to improve this
Thanks. I was renaming them prior to running them through Assemble. This will help!