Search code examples
yeomanyeoman-generator

Yeoman pass prompt answers to subgenerator


I have a yeoman generator with some subgenerators.

I know I can pass options from the parent- to the subgenerators when calling composeWith(...).

But how can I pass the answers I get from prompting? The are not available at the point when composeWith is called.

For example I prompt in the generator for an app name and want to provide this to all the subgenerators as options?


Solution

  • Oh, found in the related questions that I could call the subgenerator after prompting, instead of the initialize-method (as in the quite outdated tutorial)