()
| 48 | } |
| 49 | |
| 50 | function parseOptions () { |
| 51 | console.log() |
| 52 | program |
| 53 | .description('Creates test levels to exercise the level-generation library') |
| 54 | .option('-d, --debug', 'Debug logging') // TODO: differentiate normal, debug, and verbose logging levels |
| 55 | .option('--dry', 'Dry run--does not write levels') |
| 56 | .parse(process.argv) |
| 57 | const options = program.opts() |
| 58 | if (options.debug) { |
| 59 | debugOutput = true |
| 60 | } |
| 61 | return options |
| 62 | } |
| 63 | |
| 64 | let debugOutput = false |
| 65 | function debug (...args) { |