[英]How to copy files and folders which start with dot in their name in gulp
I am trying to copy files from one folder to another. 我正在尝试将文件从一个文件夹复制到另一个文件夹。 My source folder has following structure
我的源文件夹具有以下结构
+ source
+ file1.txt
+ .bin
+ file2.txt
+ .ignore
Now I have my gulp task as follows 现在我的任务如下
gulp.task("copy", function() {
gulp.src("./source/**/*", { base: "source" })
.pipe(gulp.dest("./dest/"));
});
This task skips copying of .bin
folder and .ignore
file. 此任务将跳过
.bin
文件夹和.ignore
文件的复制。
How do I update my task to copy the .bin
folder and .ignore
file as well ? 如何更新任务以复制
.bin
文件夹和.ignore
文件?
Can you try with "dot: true"? 您可以尝试使用“ dot:true”吗?
gulp.src("./source/**/*", { dot: true, base: "source" })
.pipe(gulp.dest("./dest/"))
If you want to know more https://github.com/isaacs/minimatch#options 如果您想了解更多https://github.com/isaacs/minimatch#options
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.