Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@gerrit0/mini-shiki

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@gerrit0/mini-shiki

This is a re-bundled version of [Shiki](https://shiki.style/) which strips out the dependencies which aren't necessary for [TypeDoc](https://typedoc.org/)'s usage.

  • 1.26.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

@gerrit0/mini-shiki

This is a re-bundled version of Shiki which strips out the dependencies which aren't necessary for TypeDoc's usage.

Why?

Compare Shiki's dependency tree:

To this package's dependency tree:

The Shiki maintainers have declined to split up the package in a way which makes it possible to avoid these dependencies when just relying on shikijs published packages.

Releases

This package will be released and keep the same major/minor version numbers as Shiki. Patch versions will generally be the same as Shiki, but may differ if adjustments are necessary to fix compatibility issues.

ESM / CommonJS

This package is ESM, but does not use top level await, so may be required in Node 23, or Node 20.17+ with the --experimental-require-module flag.

Usage

import {
  codeToTokensWithThemes,
  createShikiInternal,
  createOnigurumaEngine,
  bundledLanguages,
  bundledThemes,
  loadBuiltinWasm,
} from "@gerrit0/mini-shiki";

await loadBuiltinWasm();
const shiki = await createShikiInternal({
  engine: createOnigurumaEngine(),
  langs: [bundledLanguages.typescript],
  themes: [bundledThemes["light-plus"]],
});

const lines = codeToTokensWithThemes(shiki, "console.log('Hello world!')", {
  themes: { light: "light-plus" },
  lang: "typescript",
});

FAQs

Package last updated on 04 Jan 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc