| 62 | } |
| 63 | |
| 64 | async function pre() { |
| 65 | // Debugging helper |
| 66 | if (cmd === 'doctor') { |
| 67 | const {default: yeomanDoctor} = await import('yeoman-doctor'); |
| 68 | yeomanDoctor(); |
| 69 | return; |
| 70 | } |
| 71 | |
| 72 | if (cmd === 'completion') { |
| 73 | throw new Error('Tabtab completion is no longer supported. See https://github.com/yeoman/yo/issues/886'); |
| 74 | } |
| 75 | |
| 76 | // Easteregg |
| 77 | if (cmd === 'yeoman' || cmd === 'yo') { |
| 78 | const {default: yeomanCharacter} = await import('yeoman-character'); |
| 79 | console.log(yeomanCharacter); |
| 80 | return; |
| 81 | } |
| 82 | |
| 83 | await init(); |
| 84 | } |
| 85 | |
| 86 | function createGeneratorList(env) { |
| 87 | const generators = Object.keys(env.getGeneratorsMeta()).reduce((namesByGenerator, generator) => { |