mirror of
https://github.com/nuxt/nuxt.git
synced 2025-02-16 21:58:19 +00:00
feat(kit): support followSymbolicLinks
option for resolveFiles
(#6240)
This commit is contained in:
parent
94d0c08066
commit
8efaad43bb
@ -151,7 +151,7 @@ async function isDirectory (path: string) {
|
||||
return (await fsp.lstat(path)).isDirectory()
|
||||
}
|
||||
|
||||
export async function resolveFiles (path: string, pattern: string | string[]) {
|
||||
const files = await globby(pattern, { cwd: path, followSymbolicLinks: true })
|
||||
export async function resolveFiles (path: string, pattern: string | string[], opts: { followSymbolicLinks?: boolean } = {}) {
|
||||
const files = await globby(pattern, { cwd: path, followSymbolicLinks: opts.followSymbolicLinks ?? true })
|
||||
return files.map(p => resolve(path, p)).filter(p => !isIgnored(p)).sort()
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user