4 Commits

Author SHA1 Message Date
653782859c 1.0.4 2016-12-10 22:47:10 +01:00
199b99ae2d add npmextra.json 2016-12-10 22:46:59 +01:00
c5e55e8958 1.0.3 2016-12-10 17:30:19 +01:00
256c53b6f9 update README 2016-12-10 17:30:04 +01:00
3 changed files with 11 additions and 4 deletions

View File

@ -30,15 +30,15 @@ let myInteract = new SmartInteract([{ // note: its an array. You can specify mul
default: 'Somebody',
validate: (inputString) => { return true } // implement your own validation
}])
SmartInteract.addQuestions([ ... ]) // add more questions
SmartInteract.runQueue()
myInteract.addQuestions([ ... ]) // add more questions
myInteract.runQueue()
.then(answerBucket => { // the bucket has all the answers of the completed queue
let answerQuestion1 = answerBucket.getAnswerFor('question1')
// do something with the answers
})
// alternatively use .askQuestion() for more direct control
SmartInteract.askQuestion{ // note: its an array. You can specify multiple questions
myInteract.askQuestion{ // note: its an array. You can specify multiple questions
name: 'question2',
type: 'confirm',
message: 'Do you speak English?',

7
npmextra.json Normal file
View File

@ -0,0 +1,7 @@
{
"npmci": {
"globalNpmTool": [
"npmts"
]
}
}

View File

@ -1,6 +1,6 @@
{
"name": "smartinteract",
"version": "1.0.2",
"version": "1.0.4",
"description": "smart cli interaction",
"main": "dist/index.js",
"typings": "dist/index.d.ts",