(fromDir: string)
| 531 | } |
| 532 | |
| 533 | function findNearestTsconfig(fromDir: string): string | undefined { |
| 534 | let dir = fromDir |
| 535 | for (;;) { |
| 536 | const candidate = path.join(dir, "tsconfig.json") |
| 537 | if (fs.existsSync(candidate)) return candidate |
| 538 | const parent = path.dirname(dir) |
| 539 | if (parent === dir) return undefined |
| 540 | dir = parent |
| 541 | } |
| 542 | } |
| 543 | |
| 544 | function run() { |
| 545 | const { config, files, help, native, tsconfig } = parseArgs(process.argv.slice(2)) |