| 1 | import { slash } from '@antfu/utils' |
| 2 | import { basename } from 'pathe' |
| 3 | import { workspace } from 'vscode' |
| 4 | import { projects } from '../projects' |
| 5 | |
| 6 | export async function findPossibleEntries() { |
| 7 | const files = await workspace.findFiles('**/*.md', '**/{node_modules,.github}/**') |
| 8 | return files |
| 9 | .map(uri => slash(uri.fsPath)) |
| 10 | .filter(path => !projects.has(path)) |
| 11 | .filter(path => ![ |
| 12 | 'code_of_conduct.md', |
| 13 | 'contributing.md', |
| 14 | 'license.md', |
| 15 | 'licence.md', |
| 16 | ].includes(basename(path).toLocaleLowerCase())) |
| 17 | } |
| 18 |