1.0.6 • Published 8 months ago

shiki-command-line v1.0.6

Weekly downloads
-
License
MIT
Repository
github
Last release
8 months ago

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",
    }),
)

npm.io


console.log(
    await highlightCode(
        `body {
    content: "Hello, World!";
}`,
        {
            lang: "css",
            theme: "github-dark-default",
        },
    ),
)

npm.io


console.log(
    await highlightCode('console.log("Hello, World!")', {
        lang: "js",
        theme: "github-dark-default",
    }),
)

npm.io

1.0.6

8 months ago

1.0.5

8 months ago

1.0.4

8 months ago

1.0.3

8 months ago

1.0.2

8 months ago

1.0.1

8 months ago

1.0.0

8 months ago