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

Function isDemoFilePath

packages/create/src/edge-file-helpers.ts:73–91  ·  view source on GitHub ↗
(path?: string)

Source from the content-addressed store, hash-verified

71}
72
73export function isDemoFilePath(path?: string): boolean {
74 if (!path) return false
75 const normalized = path.replace(/\\/g, '/')
76
77 if (
78 normalized.includes('/routes/demo/') ||
79 normalized.includes('/routes/example/')
80 ) {
81 return true
82 }
83
84 const filename = normalized.split('/').pop() || ''
85 return (
86 filename.startsWith('demo.') ||
87 filename.startsWith('demo-') ||
88 filename.startsWith('example.') ||
89 filename.startsWith('example-')
90 )
91}
92
93export function cleanUpFiles(
94 files: Record<string, string>,

Callers

nothing calls this directly

Calls 1

replaceMethod · 0.65

Tested by

no test coverage detected