shiki-command-line
v1.0.6
Published
A highlighter built with Shiki for the command line.
Downloads
11
Maintainers
Readme
Shiki Command Line
A highlighter built with Shiki for the command line.
Install
pnpm add shiki-command-line
Usage
import { highlightCode } from "shiki-command-line"
console.log(
await highlightCode("<div>Hello, World!</div>", {
lang: "html",
theme: "github-dark-default",
}),
)
console.log(
await highlightCode(
`body {
content: "Hello, World!";
}`,
{
lang: "css",
theme: "github-dark-default",
},
),
)
console.log(
await highlightCode('console.log("Hello, World!")', {
lang: "js",
theme: "github-dark-default",
}),
)