A package for creating smart CLI interactions with customizable questions and answers.
Go to file
2016-11-20 01:13:33 +01:00
dist initial 2016-11-20 01:11:22 +01:00
test initial 2016-11-20 01:11:22 +01:00
ts initial 2016-11-20 01:11:22 +01:00
.gitignore initial 2016-11-20 01:11:22 +01:00
.gitlab-ci.yml initial 2016-11-20 01:11:22 +01:00
package.json initial 2016-11-20 01:11:22 +01:00
README.md Improve README 2016-11-20 01:13:33 +01:00
tslint.json initial 2016-11-20 01:11:22 +01:00

smartinteract

interact with terminal users

Availabililty

npm git git docs

Status for master

build status coverage report Dependency Status bitHound Dependencies bitHound Code TypeScript node JavaScript Style Guide

Usage

We recommend the use of TypeScript for best in class intellesense

import { SmartInteract } from 'smartinteract'

let myInteract = new SmartInteract([{ // note: its an array. You can specify multiple questions
    type: 'input',
    message: 'Who are you?',
    default: 'Somebody',
    choices: { ... }, // optional, only needed if type is 'choice'
    validate: (inputString) => { return true } // implement your own validation
}])
SmartInteract.addQuestions([ ... ]) // add more questions
SmartInteract.runQueue()
    .then(answersArray => {
        // do something with the answers
    })