5

When authoring a yeoman generator, I'd like to use the 'autocomplete' plugin for inquirer (https://github.com/mokkabonna/inquirer-autocomplete-prompt) in one of my prompts. I can't seem to find anything in the docs that says how to register this plugin with inquirer from within the yeoman generator. Is this possible?

Ben
  • 14,789
  • 19
  • 67
  • 115

1 Answers1

7

found the answer :

module.exports = class extends Generator {
  initializing() {
    this.env.adapter.promptModule.registerPrompt("autocomplete", require("inquirer-autocomplete-prompt"));
  }
}
Ben
  • 14,789
  • 19
  • 67
  • 115