Skip to content

Instantly share code, notes, and snippets.

@micahgodbolt
Created February 3, 2016 05:29
Show Gist options
  • Save micahgodbolt/554197edcd897b2e6ce9 to your computer and use it in GitHub Desktop.
Save micahgodbolt/554197edcd897b2e6ce9 to your computer and use it in GitHub Desktop.
yeoman when
var prompts = [
{
type: 'list',
name: 'type',
message: 'What category does this belong to?',
choices: ['blogs', 'books', 'podcasts', 'talks', 'tools', 'videos']
},
{
when: function (response) {
return response.type == 'blogs';
},
type: 'input',
name: 'blog_name',
message: 'Name of the blog',
},
{
type: 'input',
name: 'title',
message: 'Title',
},
{
type: 'input',
name: 'description',
message: 'Description',
},
];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment