0
用遞歸:Grunt - 忽略隱藏文件?
grunt.file.recurse('../products/', function callback(abspath, rootdir, subdir, filename) {
....
我怎樣才能得到它,所以它會忽略隱藏文件:
.DS_Store
用遞歸:Grunt - 忽略隱藏文件?
grunt.file.recurse('../products/', function callback(abspath, rootdir, subdir, filename) {
....
我怎樣才能得到它,所以它會忽略隱藏文件:
.DS_Store
檢查提供給您的回調filename
,並擺脫困境,如果你不喜歡它:
function callback(abspath, rootdir, subdir, filename) {
if (filename.startsWith('.')) return;
// Do things
}