yeoman-prompting-helpers
share prompting answers with other generators
table of contents
installation
within the generator project directory
npm install yeoman-prompting-helpers
use
initializing
in the generator’s initializing method
var PromptAnswers = PromptAnswers; thisoptionsPromptAnswers = thisoptionsPromptAnswers || ; this;
prompting
in the generator’s prompting method use the promptingHelper
var promptingHelper = promptingHelper; /** * @returns */ { return // your generator’s prompts ;} return ;
using prompt answers
anywhere the generator needs to retrieve a prompt answer
thisoptionsPromptAnswers
example project
generator-node-module illustrates how to initially setup the helpers and generator-license shows how to use the shared prompt answers