gulp.src() include files but ignore all folders
问题 There is certainly such a simple answer to this that I can't find anyone that's asked it before: What globbing pattern to include all the files in a folder but ignore ALL subfolders? gulp.src('*') includes all files and folders. I just want the files and would rather not have to exclude the folders individually. 回答1: If you want to include .dotFiles as well then try gulp.src(['folder/*.*', 'folder/.*']) 回答2: Just use the nodir option when you call gulp.src . This will actually test the files