We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e586baa commit 1500b84Copy full SHA for 1500b84
script/helpers/walk-files.js
@@ -10,10 +10,11 @@ import path from 'path'
10
import walk from 'walk-sync'
11
12
export default function walkFiles(dir, ext, opts = {}) {
13
+ const extensions = Array.isArray(ext) ? ext : [ext]
14
const dirPath = path.posix.join(process.cwd(), dir)
15
const walkSyncOpts = { includeBasePath: true, directories: false }
16
17
return walk(dirPath, walkSyncOpts)
- .filter((file) => file.endsWith(ext) && !file.endsWith('README.md'))
18
+ .filter((file) => extensions.some((ext) => file.endsWith(ext)) && !file.endsWith('README.md'))
19
.filter((file) => (opts.includeEarlyAccess ? file : !file.includes('/early-access/')))
20
}
0 commit comments