(rootDir: string)
| 279 | * it project code; the explicit `.gitignore` negation is the only opt-in). |
| 280 | */ |
| 281 | export function buildDefaultIgnore(rootDir: string): Ignore { |
| 282 | const ig = ignore().add(DEFAULT_IGNORE_PATTERNS); |
| 283 | const rootGitignore = path.join(rootDir, '.gitignore'); |
| 284 | if (fs.existsSync(rootGitignore)) ig.add(readGitignorePatterns(rootGitignore)); |
| 285 | return ig; |
| 286 | } |
| 287 | |
| 288 | /** |
| 289 | * Defaults-only ignore matcher (no root `.gitignore` merged). Used wherever the |
no test coverage detected