(rootDir: string)
| 39 | ]); |
| 40 | |
| 41 | async function loadIgnoreRules(rootDir: string): Promise<Ignore> { |
| 42 | const ig = ignore(); |
| 43 | try { |
| 44 | const content = await readFile(join(rootDir, ".gitignore"), "utf-8"); |
| 45 | ig.add(content); |
| 46 | } catch { |
| 47 | } |
| 48 | return ig; |
| 49 | } |
| 50 | |
| 51 | async function walkRecursive( |
| 52 | dir: string, |