MCPcopy Create free account
hub / github.com/codecombat/codecombat / parseOptions

Function parseOptions

scripts/generateLevels.js:50–62  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

48}
49
50function 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
64let debugOutput = false
65function debug (...args) {

Callers 1

mainFunction · 0.85

Calls 2

logMethod · 0.80
parseMethod · 0.80

Tested by

no test coverage detected