Created
March 5, 2019 14:26
-
-
Save alieslamifard/fa62769518b251a7ce3ead670a6a4ccc to your computer and use it in GitHub Desktop.
yeoman generator
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
prompting() { | |
// Have Yeoman greet the user. | |
this.log(yosay(`Welcome from ${chalk.yellow('KIAN')} development team.`)); | |
const prompts = [ | |
{ | |
type: 'input', | |
name: 'name', | |
message: 'project name?' | |
}, | |
{ | |
type: 'confirm', | |
name: 'cool', | |
message: 'Would you like to enable the Cool feature?' | |
} | |
]; | |
return this.prompt(prompts).then(props => { | |
// To access props later use this.props.someAnswer; | |
this.props = props; | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment