(argv)
| 23 | const repoRoot = path.resolve(__dirname, ".."); |
| 24 | |
| 25 | function parseArgs(argv) { |
| 26 | const args = { out: undefined, ref: undefined }; |
| 27 | for (const a of argv) { |
| 28 | if (a.startsWith("--out=")) args.out = a.slice("--out=".length); |
| 29 | else if (a.startsWith("--ref=")) args.ref = a.slice("--ref=".length); |
| 30 | else if (a === "--help" || a === "-h") args.help = true; |
| 31 | else { |
| 32 | console.error(`Unknown argument: ${a}`); |
| 33 | process.exit(2); |
| 34 | } |
| 35 | } |
| 36 | return args; |
| 37 | } |
| 38 | |
| 39 | function usage() { |
| 40 | console.error( |