gulp-assemble
gulp-assemble copied to clipboard
How to keep the original directory structure?
Hi,
I'm new to assemble and I try to use it to generate a static website on github. We have a directory structure for our *.hbs files like this :
pages
`---- file1.hbs
`---- folder
`---- file2.hbs
When I use assemble, all files are read and then copied into the same folder. I don't understand how to keep the original structure. In the documentation there is a reference to a "flatten" option but it's only available for grunt (http://assemble.io/docs/Options.html).
Is there something else available with gulp ?
gulp.task('assemble', function () {
return gulp.src('app/templates/pages/**/*.hbs')
.pipe($.plumber())
.pipe($.assemble({
flatten: false, // no effect
data: 'data/*.json',
partials: 'app/templates/partials/*.hbs',
layoutdir: 'app/templates/layouts/'
}).on("error", gutil.log))
.pipe(gulp.dest('.tmp/'));
});
I'm giving my +1 for this
Have this been looked at? I have faced the same issue today.