()
| 99 | _describeExamples() {} |
| 100 | |
| 101 | promptExampleName() { |
| 102 | if (this.shouldExit()) return; |
| 103 | if (this.options['example-name']) { |
| 104 | this.exampleName = this.options['example-name']; |
| 105 | return; |
| 106 | } |
| 107 | |
| 108 | const choices = Object.keys(EXAMPLES).map(k => { |
| 109 | return { |
| 110 | name: `${k}: ${EXAMPLES[k]}`, |
| 111 | value: `${k}`, |
| 112 | short: `${k}`, |
| 113 | }; |
| 114 | }); |
| 115 | const prompts = [ |
| 116 | { |
| 117 | name: 'name', |
| 118 | message: g.f('What example would you like to clone?'), |
| 119 | type: 'list', |
| 120 | choices, |
| 121 | }, |
| 122 | ]; |
| 123 | return this.prompt(prompts).then( |
| 124 | answers => (this.exampleName = answers.name), |
| 125 | ); |
| 126 | } |
| 127 | |
| 128 | validateExampleName() { |
| 129 | if (this.shouldExit()) return; |
nothing calls this directly
no test coverage detected