enquirer
Advanced tools
Comparing version 0.1.5 to 0.2.0
13
index.js
@@ -244,2 +244,3 @@ 'use strict'; | ||
var PromptType = this.prompts[question.type]; | ||
var key = question.name; | ||
@@ -254,8 +255,8 @@ if (typeof PromptType !== 'function') { | ||
return prompt.run(answers) | ||
.then(function(val) { | ||
question.answer = val[name]; | ||
self.emit('answer', val[name], name, question, answers); | ||
return val; | ||
}) | ||
return prompt.run() | ||
.then(function(answer) { | ||
answers[key] = question.answer = answer; | ||
self.emit('answer', answer, key, question, answers); | ||
return answers; | ||
}); | ||
@@ -262,0 +263,0 @@ } catch (err) { |
@@ -14,3 +14,3 @@ 'use strict'; | ||
require('collection-visit', 'visit'); | ||
require('enquirer-question', 'Question'); | ||
require('prompt-question', 'Question'); | ||
require('extend-shallow', 'extend'); | ||
@@ -17,0 +17,0 @@ require('isobject', 'isObject'); |
{ | ||
"name": "enquirer", | ||
"description": "Intuitive, plugin-based prompt system for node.js. Much faster and lighter alternative to Inquirer, with all the same prompt types and more, but without the bloat.", | ||
"version": "0.1.5", | ||
"version": "0.2.0", | ||
"homepage": "https://github.com/enquirer/enquirer", | ||
@@ -31,4 +31,3 @@ "author": "Jon Schlinkert (https://github.com/jonschlinkert)", | ||
"debug": "^2.2.0", | ||
"enquirer-prompt-input": "^0.1.0", | ||
"enquirer-question": "^0.2.1", | ||
"enquirer-prompt-input": "^0.2.0", | ||
"extend-shallow": "^2.0.1", | ||
@@ -38,2 +37,3 @@ "isobject": "^2.1.0", | ||
"promise-reduce": "^2.1.0", | ||
"prompt-question": "^0.3.1", | ||
"readline-ui": "^0.1.0" | ||
@@ -40,0 +40,0 @@ }, |
@@ -180,7 +180,7 @@ # enquirer [![NPM version](https://img.shields.io/npm/v/enquirer.svg?style=flat)](https://www.npmjs.com/package/enquirer) [![NPM downloads](https://img.shields.io/npm/dm/enquirer.svg?style=flat)](https://npmjs.org/package/enquirer) [![Build Status](https://img.shields.io/travis/enquirer/enquirer.svg?style=flat)](https://travis-ci.org/enquirer/enquirer) | ||
### [.separator](index.js#L271) | ||
### [.separator](index.js#L272) | ||
Create a new `Separator` to use in a choices array. | ||
### [.Separator](index.js#L294) | ||
### [.Separator](index.js#L295) | ||
@@ -187,0 +187,0 @@ Create a new `Separator` to use in a choices array. |
22401
293
+ Addedprompt-question@^0.3.1
+ Addedenquirer-prompt-input@0.2.0(transitive)
+ Addedprompt-base@0.3.2(transitive)
+ Addedprompt-choices@0.3.2(transitive)
+ Addedprompt-question@0.3.1(transitive)
- Removedenquirer-question@^0.2.1
- Removedenquirer-prompt@0.1.0(transitive)
- Removedenquirer-prompt-input@0.1.0(transitive)
- Removedenquirer-question@0.1.20.2.1(transitive)
- Removedprompt-choices@0.1.10.2.1(transitive)
Updatedenquirer-prompt-input@^0.2.0