-
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Qu4k
committed
Aug 30, 2020
1 parent
4782f43
commit e353b72
Showing
4 changed files
with
12 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
export * as colors from "https://deno.land/[email protected]/fmt/colors.ts"; | ||
export { encode, decode } from "https://deno.land/[email protected]/encoding/utf8.ts"; | ||
export * as tty from "https://deno.land/x/[email protected]/mod.ts"; | ||
export { onExit } from "https://deno.land/x/[email protected]/mod.ts"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import { wait } from "../mod.ts"; | ||
|
||
const spinner = wait("Loading mesozoic").start(); | ||
|
||
setTimeout(() => { | ||
spinner.color = "yellow"; | ||
spinner.text = "Loading meteorite"; | ||
}, 1000); | ||
|
||
setTimeout(() => { | ||
spinner.succeed("Started human race"); | ||
}, 2000); |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,6 @@ import { colors, encode, tty } from "./deps.ts"; | |
import spinners from "./spinners.ts"; | ||
|
||
import { symbols } from "./log_symbols.ts"; | ||
import { onExit } from "https://deno.land/x/[email protected]/mod.ts"; | ||
|
||
type ColorFunction = (message: string) => string; | ||
const colormap: { [key: string]: ColorFunction } = { | ||
|
@@ -157,9 +156,6 @@ export class Spinner { | |
|
||
if (this.#opts.hideCursor && Deno.build.os !== "windows") { | ||
tty.hideCursorSync(this.#stream); | ||
onExit(() => { | ||
tty.showCursorSync(this.#stream); | ||
}); | ||
} | ||
|
||
this.render(); | ||
|