Skip to content

Commit

Permalink
[BUGFIX] UI is eagerly consumed, but prompt (which costs a 100ms or s…
Browse files Browse the repository at this point in the history
…o) is in-frequently used and so it should be required was late as possible
  • Loading branch information
stefanpenner committed Jul 4, 2014
1 parent 56caac8 commit 0ae78df
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions lib/ui/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ function UI(options) { // options === { inputStream, outputStream }
var pleasantProgress = this.pleasantProgress = new PleasantProgress();

this.through = require('through');
this.Prompt = require('inquirer').ui.Prompt;
this.readline = require('readline2');

// Output stream
Expand All @@ -38,7 +37,7 @@ UI.prototype.prompt = function(questions, callback) {
var promtOutputStream = this.through(null, function() {});
promtOutputStream.pipe(this.outputStream);

var Prompt = this.Prompt;
var Prompt = require('inquirer').ui.Prompt;
// Note: Cannot move this outside
// Need a new readline interface each time, 'cause it gets torn down
function PromptExt() {
Expand Down

0 comments on commit 0ae78df

Please sign in to comment.