I have met a problem ,when I want to use gulp to move files from one directory to another directory, gulp will miss the file like .gitignore or .babelrc.
โโโฌ source
โ โโโ hello.txt
โ โโโ .gitignore
โ โโโ .babelrc
Here is my code, I put it in a javascript file, and run it with node.
vargulp = require('gulp');
gulp.src('source/**/*').pipe(gulp.dest('./dest'))
after run this file, only hello.txt has been moved normally.
โโโฌ dest
โ โโโ hello.txt
Use {dot: true} in gulp.src to enable finding dotfiles:
gulp.src('source/**/*', {dot: true}).pipe(gulp.dest('./dest'));
Thanks, @doowb ๐
Most helpful comment
Use
{dot: true}ingulp.srcto enable findingdotfiles: