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
246246``` js
247247module .exports = api => {
248248 // a feature object should be a valid inquirer choice object
249- cli .injectFeature ({
249+ api .injectFeature ({
250250 name: ' Some great feature' ,
251251 value: ' my-feature'
252252 })
253253
254254 // injectPrompt expects a valid inquirer prompt object
255- cli .injectPrompt ({
255+ api .injectPrompt ({
256256 name: ' someFlag' ,
257257 // make sure your prompt only shows up if user has picked your feature
258258 when : answers => answers .features .include (' my-feature' ),
@@ -262,7 +262,7 @@ module.exports = api => {
262262
263263 // when all prompts are done, inject your plugin into the options that
264264 // will be passed on to Generators
265- cli .onPromptComplete ((answers , options ) => {
265+ api .onPromptComplete ((answers , options ) => {
266266 if (answers .features .includes (' my-feature' )) {
267267 options .plugins [' vue-cli-plugin-my-feature' ] = {
268268 someFlag: answers .someFlag
You can’t perform that action at this time.
0 commit comments