I have a project like this:
root
|-incl1
|-incl2
|- ...
|-excl1
|-excl2
|- .gitignore <-- keep this one
|- (other files) <-- exclude them
I need to write gulp.src()
that will include all folders except excl1
and excl2
but keep the .gitignore
file.
This is my code that doesn't work:
gulp.src([
baseDir + '/**',
'!' + baseDir + '/{excl1, excl1/**}'
'!' + baseDir + '/excl2/{**, !.gitignore}' // <-- doesn't work
], {dot: true})