Last active
August 29, 2015 13:55
-
-
Save sondr3/8731210 to your computer and use it in GitHub Desktop.
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
YeomanGenerator.prototype.askForThings = function askForThings() { | |
var cb = this.async(); | |
var prompts = [{ | |
name: 'questionOne', | |
type: 'list', | |
message: 'Message, message?', | |
choices: ['optionOne', 'optionTwo', 'optionThree', 'optionFour', 'optionFive', 'optionSix', 'None'], | |
filter: function(value) { | |
return value.toLowerCase(); | |
} | |
} | |
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
YeomanGenerator.prototype.askForMoreThings = function askForMoreThings() { | |
var cb = this.async(); | |
var questionOne = this.questionOne; | |
{ | |
name: 'questionOneDirectory', | |
message: 'Question question', | |
default: function(default) { | |
if (this.questionOne === 'optionOne') { | |
this.default("'/directory/_one'"); | |
} | |
else if (this.questionOne === 'optionTwo') { | |
this.default("'/directory/_two'"); | |
} | |
else if (this.questionOne === 'optionThree') { | |
this.default("'/directory/_three'"); | |
} | |
else if (this.questionOne === 'optionFour') { | |
this.default("'/directory/_four'"); | |
} | |
else if (this.questionOne === 'optionFive') { | |
this.default("'/directory/_five'"); | |
} | |
else if (this.questionOne === 'optionSix') { | |
this.default("'/directory/_six'"); | |
} | |
}, | |
filter: function(value) { return value.split('/').pop(); }, | |
when: function() { | |
return questionOne; | |
}, |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment