Answer the question
In order to leave comments, you need to log in
How to exclude all contents of a directory in gulp.src but leave .htaccess in it?
It is necessary to exclude the contents of the cache folder in the build task, leaving only the .htaccess file in it.
Task content:
gulp.task('build', gulp.series('clean', function () {
return gulp.src([
"app/**/*",
"!app/cache/**/*",
"app/cache/.htaccess",
], {allowEmpty: true, dot: true})
.pipe(gulp.dest('dist'));
}));
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question