Reputation: 2395
I'd like to copy the contents of a directory recursively, but without the parent directory (foo in my example).
gulp.task('copy', ['clean:tmp'], function() {
return gulp.src(['src/foo/**/*'], {base:"src"})
.pipe(gulp.dest('src/.tmp/'));
});
This produces the following hieararchy:
src/.tmp/foo/{contents}
But I would like to have it without the foo
folder:
src/.tmp/{contents}
Upvotes: 0
Views: 402
Reputation: 881
{ base: 'src/foo' }
Should solve your problem. You have to define the base explicitly.
Upvotes: 1