Skip to main content
Module

x/cliffy/examples/ansi.ts

Command line framework for deno 🦕 Including Commandline-Interfaces, Prompts, CLI-Table, Arguments Parser and more...
Extremely Popular
Go to Latest
File
#!/usr/bin/env -S deno run --unstable
import { colors, tty } from "../ansi/mod.ts";import { delay } from "https://deno.land/std@0.155.0/async/delay.ts";
const error = colors.bold.red;const warn = colors.bold.yellow;const info = colors.bold.blue;
console.log(info("This is an info message!"));console.log(warn("This is a warning!"));console.log(error("This is an error message!"));console.log(error.underline("This is a critical error message!"));
await delay(3000);
tty.cursorLeft.cursorUp(4).eraseDown();