@form8ion/overridable-prompts

1.2.0 • Public • Published

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

Readme

Keywords

none

Package Sidebar

Install

npm i @form8ion/overridable-prompts

Weekly Downloads

2,236

Version

1.2.0

License

MIT

Unpacked Size

17.7 kB

Total Files

7

Last publish

Collaborators

  • travi
  • form8ion-bot