Skip to content

mistweaverco/cli-html-node

Repository files navigation

cli-html Logo

cli-html

Made with love GitHub release (latest by date)

UsageHow it worksHonroable Mentions

Render HTML in the Terminal.

Supports some fancy stuff and has TypeScript support.

Usage

npm i @mistweaverco/cli-html
import cliHtml from "@mistweaverco/cli-html";

const html = `
<h1>Hello World</h1>
`;

console.log(cliHtml(html));

How it works

cli-html uses chalk to style the output.

We're purposely stuck on v4.0.1, because this version supports chalk to be bundled with the package.

This way you can completly bundle the package and use it in your CLI applications.

Honroable Mentions

This package was based-off cli-html, but we wanted TypeScript support and also it being able to be fully bundled.

The orginal one relied on some packages that did not make this possible.

Also the original package says that it's not supported/maintained anymore.

We couldn't have done this without chalk.

Does all the heavy lifting for parsing the HTML.

About

Convert HTML to CLI output with TypeScript support

Resources

License

Stars

Watchers

Forks

Releases

No releases published