Created
October 28, 2019 15:27
-
-
Save vyuvalv/01e1b7f8aa08d7bc5cafd1f1d6669541 to your computer and use it in GitHub Desktop.
Prompting questions on yeoman
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
async prompting() { | |
const menuQuestions = await this.prompt([ { | |
type: 'checkbox', | |
name: 'mainMenu', | |
message: 'What would you like to do?', | |
choices: [ | |
{ | |
name: ’option1', | |
value: ’option1', | |
checked: true | |
}, { | |
name: ’option2’, | |
value: ’option2', | |
checked: false | |
}] | |
}]).then((menuQuestions) => { | |
this.selectedOptions = menuQuestions.mainMenu; | |
this.log( ”you selected ” + this.selectedOptions ); | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment