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

Function pruneEmptyDemoDirs

packages/cli/src/cli.ts:418–431  ·  view source on GitHub ↗
(root: string)

Source from the content-addressed store, hash-verified

416 }
417
418 function pruneEmptyDemoDirs(root: string) {
419 const candidates = ['src/routes/demo', 'src/routes/example']
420 for (const rel of candidates) {
421 const dir = resolve(root, rel)
422 if (!fs.existsSync(dir)) continue
423 try {
424 if (fs.readdirSync(dir).length === 0) {
425 fs.rmdirSync(dir)
426 }
427 } catch {
428 // ignore
429 }
430 }
431 }
432
433 function findExclusiveConflicts(
434 addOns: Options['chosenAddOns'],

Callers 1

cliFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected