[英]yeoman call generator prompt from sub-generator
I have yo someGen
, that prompts few questions. 我有
yo someGen
,提示了几个问题。 one of the prompts, someQuestion
is asking would you like to use smthng?
提示之一,
someQuestion
正在询问would you like to use smthng?
and the user can choose from smthng1
, smthng2
or no
. 用户可以从
smthng1
, smthng2
或no
。
I have aa sub generator yo someGen:smthng
that do something else( smthng1
or smthng2
) , with regard to the answer from someQuestion
. 关于
someQuestion
的答案,我有一个子生成器yo someGen:smthng
可以做其他事情( smthng1
或smthng2
)。
Now if the user trying yo someGen:smthng
, but earlier (in main gen) he answered no
, I want to propmt someQuestion
again. 现在,如果用户尝试
yo someGen:smthng
,但是更早(在主要一代中)他回答no
,那么我想再次提示someQuestion
。 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. 让他有机会立即决定
smthng
,然后根据新答案操作yo someGen:smthng
,并具有后悔和no
回答的能力。
How would I do that? 我该怎么做?
Use the yeoman-generator
configuration to store user choices. 使用
yeoman-generator
配置来存储用户选择。 See the documentation http://yeoman.io/authoring/storage.html 请参阅文档http://yeoman.io/authoring/storage.html
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.