yonatanmn
yonatanmn

Reputation: 1600

yeoman call generator prompt from sub-generator

I have yo someGen, that prompts few questions. one of the prompts, someQuestion is asking would you like to use smthng? and the user can choose from smthng1,smthng2 or no.

I have a a sub generator yo someGen:smthng that do something else(smthng1 or smthng2) , with regard to the answer from someQuestion.

Now if the user trying yo someGen:smthng, but earlier (in main gen) he answered no, I want to propmt someQuestion again. giving him the chance to decide smthng now, and then operate yo someGen:smthng according to the new answer, with the ability to regret and answer no again.

How would I do that?

Upvotes: 0

Views: 151

Answers (1)

Simon Boudrias
Simon Boudrias

Reputation: 44669

Use the yeoman-generator configuration to store user choices. See the documentation http://yeoman.io/authoring/storage.html

Upvotes: 0

Related Questions