(env)
| 84 | } |
| 85 | |
| 86 | function createGeneratorList(env) { |
| 87 | const generators = Object.keys(env.getGeneratorsMeta()).reduce((namesByGenerator, generator) => { |
| 88 | const parts = generator.split(':'); |
| 89 | const generatorName = parts.shift(); |
| 90 | |
| 91 | // If first time we found this generator, prepare to save all its sub-generators |
| 92 | namesByGenerator[generatorName] ||= []; |
| 93 | |
| 94 | // If sub-generator (!== app), save it |
| 95 | if (parts[0] !== 'app') { |
| 96 | namesByGenerator[generatorName].push(parts.join(':')); |
| 97 | } |
| 98 | |
| 99 | return namesByGenerator; |
| 100 | }, {}); |
| 101 | |
| 102 | if (Object.keys(generators).length === 0) { |
| 103 | return ' Couldn\'t find any generators, did you install any? Troubleshoot issues by running\n\n $ yo doctor'; |
| 104 | } |
| 105 | |
| 106 | return Object.keys(generators).map(generator => { |
| 107 | const subGenerators = generators[generator].map(subGenerator => ` ${subGenerator}`).join('\n'); |
| 108 | return ` ${generator}\n${subGenerators}`; |
| 109 | }).join('\n'); |
| 110 | } |
| 111 | |
| 112 | const onError = error => { |
| 113 | console.error('Error', process.argv.slice(2).join(' '), '\n'); |
no outgoing calls
no test coverage detected
searching dependent graphs…