now preventing async readline clutter
This commit is contained in:
parent
846bcf66db
commit
295e568097
9
dist/index.js
vendored
9
dist/index.js
vendored
@ -1,6 +1,7 @@
|
||||
"use strict";
|
||||
require("typings-global");
|
||||
var path = require("path");
|
||||
var readline = require("readline");
|
||||
var childProcess = require("child_process");
|
||||
var earlyChild;
|
||||
var doAnimation = true;
|
||||
@ -31,7 +32,13 @@ exports.start = function (moduleNameArg, loaderLengthArg) {
|
||||
exports.stop = function () {
|
||||
if (doAnimation) {
|
||||
earlyChild.kill();
|
||||
var rl = readline.createInterface({
|
||||
input: process.stdin,
|
||||
output: process.stdout
|
||||
});
|
||||
rl.write(null, { ctrl: true, name: 'u' });
|
||||
rl.close();
|
||||
}
|
||||
};
|
||||
|
||||
//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImluZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFBQSxRQUFPLGdCQUNQLENBQUMsQ0FEc0I7QUFFdkIsSUFBTyxJQUFJLFdBQVcsTUFBTSxDQUFDLENBQUM7QUFFOUIsSUFBTyxZQUFZLFdBQVcsZUFBZSxDQUFDLENBQUM7QUFDL0MsSUFBSSxVQUFVLENBQUM7QUFFZixJQUFJLFdBQVcsR0FBVyxJQUFJLENBQUM7QUFDL0IsSUFBSSxNQUFNLEdBQVcsS0FBSyxDQUFDO0FBQzNCLEVBQUUsQ0FBQSxDQUFDLE9BQU8sQ0FBQyxJQUFJLENBQUMsT0FBTyxDQUFDLElBQUksQ0FBQyxJQUFJLENBQUMsQ0FBQyxJQUFJLE9BQU8sQ0FBQyxHQUFHLENBQUMsRUFBRSxDQUFDLENBQUEsQ0FBQztJQUNuRCxXQUFXLEdBQUcsS0FBSyxDQUFDO0FBQ3hCLENBQUM7QUFBQyxJQUFJLENBQUMsRUFBRSxDQUFBLENBQUMsT0FBTyxDQUFDLElBQUksQ0FBQyxPQUFPLENBQUMsSUFBSSxDQUFDLEl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iAgICAgICAgICAgICAgICBsb2FkZXJMZW5ndGhBcmc6bG9hZGVyTGVuZ3RoQXJnLFxuICAgICAgICAgICAgICAgIENJOiBwcm9jZXNzLmVudi5DSVxuICAgICAgICAgICAgfVxuICAgICAgICB9KTtcbiAgICB9IGVsc2UgaWYgKGRvVGV4dCkge1xuICAgICAgICBjb25zb2xlLmxvZyhcIioqKiogc3RhcnRpbmcgXCIgKyBtb2R1bGVOYW1lQXJnLmN5YW4gKyBcIiAqKioqXCIpO1xuICAgIH1cbn07XG5cbmV4cG9ydCBsZXQgc3RvcCA9IGZ1bmN0aW9uKCl7XG4gICAgaWYoZG9BbmltYXRpb24pe1xuICAgICAgICBlYXJseUNoaWxkLmtpbGwoKTtcbiAgICAgICAgbGV0IHJsID0gcmVhZGxpbmUuY3JlYXRlSW50ZXJmYWNlKHtcbiAgICAgICAgICAgIGlucHV0OiBwcm9jZXNzLnN0ZGluLFxuICAgICAgICAgICAgb3V0cHV0OiBwcm9jZXNzLnN0ZG91dFxuICAgICAgICB9KTtcbiAgICAgICAgcmwud3JpdGUobnVsbCwge2N0cmw6IHRydWUsIG5hbWU6ICd1J30pO1xuICAgICAgICBybC5jbG9zZSgpO1xuICAgIH1cbn07XG5cbiJdfQ==
|
||||
|
@ -31,6 +31,12 @@ export let start = function(moduleNameArg:string = "",loaderLengthArg:string = "
|
||||
export let stop = function(){
|
||||
if(doAnimation){
|
||||
earlyChild.kill();
|
||||
let rl = readline.createInterface({
|
||||
input: process.stdin,
|
||||
output: process.stdout
|
||||
});
|
||||
rl.write(null, {ctrl: true, name: 'u'});
|
||||
rl.close();
|
||||
}
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user