File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -246,13 +246,13 @@ A prompt module should export a function that receives a [PromptModuleAPI][promp
246
246
``` js
247
247
module .exports = api => {
248
248
// a feature object should be a valid inquirer choice object
249
- cli .injectFeature ({
249
+ api .injectFeature ({
250
250
name: ' Some great feature' ,
251
251
value: ' my-feature'
252
252
})
253
253
254
254
// injectPrompt expects a valid inquirer prompt object
255
- cli .injectPrompt ({
255
+ api .injectPrompt ({
256
256
name: ' someFlag' ,
257
257
// make sure your prompt only shows up if user has picked your feature
258
258
when : answers => answers .features .include (' my-feature' ),
@@ -262,7 +262,7 @@ module.exports = api => {
262
262
263
263
// when all prompts are done, inject your plugin into the options that
264
264
// will be passed on to Generators
265
- cli .onPromptComplete ((answers , options ) => {
265
+ api .onPromptComplete ((answers , options ) => {
266
266
if (answers .features .includes (' my-feature' )) {
267
267
options .plugins [' vue-cli-plugin-my-feature' ] = {
268
268
someFlag: answers .someFlag
You can’t perform that action at this time.
0 commit comments