(dir: string)
| 157 | } |
| 158 | |
| 159 | export function collectDocFiles(dir: string): { relativePath: string }[] { |
| 160 | return (fs.readdirSync(dir, { recursive: true }) as string[]) |
| 161 | .filter( |
| 162 | (f) => |
| 163 | (f.endsWith('.mdx') || f.endsWith('.md')) && |
| 164 | !/[/\\]index\.mdx$/.test(f) && |
| 165 | !/[/\\]index\.md$/.test(f) && |
| 166 | !f.startsWith('index.') |
| 167 | ) |
| 168 | .sort() |
| 169 | .map((f) => ({ relativePath: f.replace(/\\/g, '/') })) |
| 170 | } |
| 171 | |
| 172 | interface DocSection { |
| 173 | name: string |
no test coverage detected