MCPcopy Create free account
hub / github.com/TanStack/cli / walk

Function walk

packages/cli/src/cli.ts:397–413  ·  view source on GitHub ↗
(dir: string)

Source from the content-addressed store, hash-verified

395 function findDemoFiles(root: string): Array<string> {
396 const results: Array<string> = []
397 function walk(dir: string) {
398 let entries: Array<fs.Dirent>
399 try {
400 entries = fs.readdirSync(dir, { withFileTypes: true })
401 } catch {
402 return
403 }
404 for (const entry of entries) {
405 const full = resolve(dir, entry.name)
406 if (entry.isDirectory()) {
407 if (CLEAN_DEMOS_SKIP_DIRS.has(entry.name)) continue
408 walk(full)
409 } else if (entry.isFile() && isDemoFilePath(full)) {
410 results.push(full)
411 }
412 }
413 }
414 walk(root)
415 return results.sort()
416 }

Callers 1

findDemoFilesFunction · 0.85

Calls 1

isDemoFilePathFunction · 0.90

Tested by

no test coverage detected