()
| 65 | } |
| 66 | |
| 67 | getInputFile() { |
| 68 | if (this.program.args.length > 1) { |
| 69 | throw `Only one input file allowed, but ${this.program.args.length} given instead.`; |
| 70 | } |
| 71 | if (this.program.args[0] && !fs.existsSync(this.program.args[0])) { |
| 72 | throw `File ${this.program.args[0]} does not exist.`; |
| 73 | } |
| 74 | return this.program.args[0]; |
| 75 | } |
| 76 | |
| 77 | getReplace() { |
| 78 | if (!this.opts().replace) { |