* Parses and validates command line options from argv. * * - On success returns object with options. * - On failure throws exceptions with error message to be shown to user. * * @param {String[]} argv Raw command line arguments * @return {Object} options object
(argv)
| 54 | * @return {Object} options object |
| 55 | */ |
| 56 | parse(argv) { |
| 57 | this.program.parse(argv); |
| 58 | |
| 59 | return { |
| 60 | inFile: this.getInputFile(), |
| 61 | outFile: this.opts().outFile, |
| 62 | replace: this.getReplace(), |
| 63 | transforms: this.getTransforms(), |
| 64 | }; |
| 65 | } |
| 66 | |
| 67 | getInputFile() { |
| 68 | if (this.program.args.length > 1) { |
no test coverage detected