From 01703e558458fd1a90ad2945631e67a6ebb93158 Mon Sep 17 00:00:00 2001 From: Aya Morisawa Date: Wed, 25 Jul 2018 12:52:17 +0900 Subject: [PATCH] Fix #1975 --- src/misc/cli/indicator.ts | 35 ----------------------------------- 1 file changed, 35 deletions(-) delete mode 100644 src/misc/cli/indicator.ts diff --git a/src/misc/cli/indicator.ts b/src/misc/cli/indicator.ts deleted file mode 100644 index 3e23f9b274..0000000000 --- a/src/misc/cli/indicator.ts +++ /dev/null @@ -1,35 +0,0 @@ -import * as readline from 'readline'; - -/** - * Indicator - */ -export default class { - private clock: NodeJS.Timer; - - constructor(text: string) { - let i = 0; // Dots counter - - draw(); - this.clock = setInterval(draw, 300); - - function draw(): void { - cll(); - i = (i + 1) % 4; - const dots = new Array(i + 1).join('.'); - process.stdout.write(text + dots); // Write text - } - } - - public end(): void { - clearInterval(this.clock); - cll(); - } -} - -/** - * Clear current line - */ -function cll(): void { - readline.clearLine(process.stdout, 0); // Clear current text - readline.cursorTo(process.stdout, 0, null); // Move cursor to the head of line -}