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

How to keep the original directory structure?

Open hlassiege opened this issue 10 years ago • 2 comments

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/'));
});

hlassiege avatar Feb 11 '15 14:02 hlassiege

I'm giving my +1 for this

fterrier avatar Apr 23 '15 10:04 fterrier

Have this been looked at? I have faced the same issue today.

kluplau avatar Sep 14 '15 10:09 kluplau