Thanks for lending a hand 👋
- We use pnpm to manage dependencies. Install it with
npm i -g pnpm
. - Install dependencies with
pnpm i
. - Build all packages with
pnpm build
.
graph TD
tm-grammars([tm-grammars]) -.-> shiki
core --> shiki
tm-themes([tm-themes]) -.-> shiki
shiki{{shiki}} --> twoslash
shiki --> markdown-it
shiki --> compat[/compat\]
shiki --> rehype
shiki --> monaco
transformers
core
contains the core logic of Shiki, without any languages/themes prebundled. Published as@shikijs/core
.shiki
is the main package that bundles languages/themes fromtm-grammars
andtm-themes
for easier usage. Published asshiki
.compat
contains the compatibility layer for Shiki v0.x. Published as@shikijs/compat
.transformers
contains common transformers for Shiki. Published as@shikijs/transformer
.- The rest of the packages are high-level integrations on top of
shiki
.
- We use Vitest to test the codebase. Run
pnpm test
to start the test runner. - We have quite some Snapshot Tests to ensure the output is consistent. If you are making changes to the output, run
pnpm test -u
to update the snapshots.
- We use ESLint to lint and format the codebase. Before you commit, all files will be formatted automatically.
- We use Conventional Commits. Please use a prefix. If your PR has multiple commits and some of them don't follow the Conventional Commits rule, we'll do a squash merge.