Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Glob /* doesn't match files starting with dot

Tags:

gulp

glob

I'm using gulp to copy all files from one dir to another using code like this:

gulp.src([ 'app/**/*' ]).pipe(gulp.dest('dist'));

Glob docs say * match all files, but in fact files which have names starting with dot, like .gitignore, are not copied.

How can it be worked around?

like image 276
setec Avatar asked Apr 09 '15 08:04

setec


1 Answers

If you add the option dot: true, it should work. Eg:

gulp.task('something', function () {
    return gulp.src([ 'app/**/*' ], {
        dot: true
    }).pipe(gulp.dest('dist'));
});

Reference

like image 75
Tony Barnes Avatar answered Oct 22 '22 07:10

Tony Barnes