base-questions
Advanced tools
Comparing version 0.2.5 to 0.2.6
@@ -24,2 +24,3 @@ /*! | ||
updateOpts(); | ||
utils.forceExit(); | ||
var Questions = utils.questions; | ||
@@ -34,2 +35,3 @@ var questions = new Questions(options); | ||
/** | ||
@@ -36,0 +38,0 @@ * Pre-populate answers with data from `app.store.data` and |
{ | ||
"name": "base-questions", | ||
"description": "Plugin for base-methods that adds methods for prompting the user and storing the answers on a project-by-project basis.", | ||
"version": "0.2.5", | ||
"version": "0.2.6", | ||
"homepage": "https://github.com/jonschlinkert/base-questions", | ||
@@ -30,3 +30,3 @@ "author": "Jon Schlinkert (https://github.com/jonschlinkert)", | ||
"mixin-deep": "^1.1.3", | ||
"question-store": "^0.4.0", | ||
"question-store": "^0.4.2", | ||
"set-value": "^0.3.2", | ||
@@ -33,0 +33,0 @@ "to-choices": "^0.1.1" |
17
utils.js
@@ -26,2 +26,19 @@ 'use strict'; | ||
/** | ||
* Force exit if "ctrl+c" is pressed | ||
*/ | ||
utils.forceExit = function() { | ||
var stdin = process.stdin; | ||
stdin.setRawMode(true); | ||
stdin.resume(); | ||
stdin.setEncoding('utf8'); | ||
stdin.on('data', function(key) { | ||
if (key === '\u0003') { | ||
process.stdout.write('\u001b[1A'); | ||
process.exit(); | ||
} | ||
}); | ||
}; | ||
/** | ||
* Expose `utils` modules | ||
@@ -28,0 +45,0 @@ */ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
14223
205
Updatedquestion-store@^0.4.2