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

Function isDemoFilePath

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

Source from the content-addressed store, hash-verified

113}
114
115export function isDemoFilePath(path?: string): boolean {
116 if (!path) return false
117 const normalized = path.replace(/\\/g, '/')
118
119 if (
120 normalized.includes('/routes/demo/') ||
121 normalized.includes('/routes/example/')
122 ) {
123 return true
124 }
125
126 const filename = normalized.split('/').pop() || ''
127 return (
128 filename.startsWith('demo.') ||
129 filename.startsWith('demo-') ||
130 filename.startsWith('example.') ||
131 filename.startsWith('example-')
132 )
133}
134
135export function findFilesRecursively(
136 path: string,

Callers 3

walkFunction · 0.90
stripExamplesFromOptionsFunction · 0.70
stripExamplesFromOptionsFunction · 0.70

Calls 1

replaceMethod · 0.65

Tested by

no test coverage detected