node-glob

gulp.src() include files but ignore all folders

做~自己de王妃 提交于 2019-12-23 14:19:53
问题 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

gulp.src() include files but ignore all folders

有些话、适合烂在心里 提交于 2019-12-23 14:19:01
问题 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

How to make Gulp.src fail if a file is missing?

寵の児 提交于 2019-12-22 03:33:21
问题 Our gulp build takes a bunch of libraries installed with bower, then concatenates them with all the code we have distributed across several directories. Here's what it looks like: var jsFiles = [ sourcePath + '/config/config.js', sourcePath + '/vendor/jquery/dist/jquery.js', sourcePath + '/vendor/js-cookie/src/js.cookie.js', sourcePath + '/vendor/modernizr/modernizr.js', sourcePath + '/vendor/lodash/lodash.js', sourcePath + '/vendor/picturefill/dist/picturefill.min.js', sourcePath + '