| 71 | } |
| 72 | |
| 73 | export 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 | |
| 93 | export function cleanUpFiles( |
| 94 | files: Record<string, string>, |