这似乎可行:
gulp.src([ baseDir + '!(.gitignore)', // Exclude excl2 dir, except .gitignore], { dot: true });从全局匹配中排除单个文件非常棘手,因为在minimatch文档中没有类似的示例。
https://github.com/isaacs/minimatch
“如果模式以
!字符开头,则否定”。

这似乎可行:
gulp.src([ baseDir + '!(.gitignore)', // Exclude excl2 dir, except .gitignore], { dot: true });从全局匹配中排除单个文件非常棘手,因为在minimatch文档中没有类似的示例。
https://github.com/isaacs/minimatch
“如果模式以
!字符开头,则否定”。