Skip to content

form8ion/overridable-prompts

Repository files navigation

overridable-prompts

Inquirer prompts that can be overriden with provided answers

Node CI Workflow Status

Table of Contents

Usage

npm Try @form8ion/overridable-prompts on RunKit MIT license

Installation

$ npm install @form8ion/overridable-prompts --save-prod

Example

Import

import {prompt} from '@form8ion/overridable-prompts';

Execute

  const answers = await prompt(
    [
      {
        name: 'Question #1',
        message: 'What should we ask first?'
      },
      {
        name: 'Question #2',
        message: 'What should we ask second?',
        when: answerList => 'Provided answer for `Question #1`' === answerList['Question #1']
      }
    ],
    {
      'Question #1': 'Provided answer for `Question #1`',
      'Question #2': 'Provided answer for `Question #2`'
    }
  );

Contributing

Conventional Commits Commitizen friendly semantic-release PRs Welcome Renovate

Dependencies

$ nvm install
$ npm install

Verification

$ npm test