Open julienbachmann opened 9 years ago
Check the glob pattern: https://github.com/spmjs/node-scp2/blob/master/lib/scp.js#L54
so, yes glob can copy hidden file but you have to give the option { dot:true } when calling glob. Otherwise dot file are not returned by glob (read Dots chapter here https://www.npmjs.com/package/glob).
And unfortunately scp2 does use this option so I think you should also add this option to scp2 and then use it when calling glob. Or use it by default as scp command line copy hidden file when copying directory.
@julienbachmann I have found a workaround (in gulp) for this problem by just adding the hidden files manualy like this:
return gulp.src( ['dist/**/*', './dist/.htaccess', 'dist/.htpasswd'] )...
Or even better:
gulp.src( ['dist/**/*', './dist/**/.*'] )
Works for me.
From what I can tell this isn't a copy issue but rather a issue with gulp.src(). I too would like **/*.*
to find ALL files, as that's literally what is being said. Perhaps what is needed is partial regular expressions like: **/*[.]?*
I've noticed that when I use scp2 to copy an entire directory, then all hidden file (.something) that are in subfolder are not copied.