From 145d5bc6e4653a79aa604dc43cf8a7a3c092c2aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Allen=20Zhang=20=28=E5=BC=A0=E6=B6=9B=29?= Date: Sat, 12 Oct 2024 12:25:58 +0800 Subject: [PATCH] feat: update --- examples/vite-vue/package.json | 1 + .../canyon-platform/src/components/CanyonReport/loadShiki.ts | 2 ++ 2 files changed, 3 insertions(+) diff --git a/examples/vite-vue/package.json b/examples/vite-vue/package.json index ae5a99d1..3d35a0b6 100644 --- a/examples/vite-vue/package.json +++ b/examples/vite-vue/package.json @@ -16,6 +16,7 @@ "typescript": "^5.2.2", "vite": "^5.0.8", "vite-plugin-istanbul": "^5.0.0", + "vite-plugin-canyon": "^0.0.1-alpha.13", "vue-tsc": "^1.8.25" } } diff --git a/packages/canyon-platform/src/components/CanyonReport/loadShiki.ts b/packages/canyon-platform/src/components/CanyonReport/loadShiki.ts index 9b2a59e1..4ca2c2f7 100644 --- a/packages/canyon-platform/src/components/CanyonReport/loadShiki.ts +++ b/packages/canyon-platform/src/components/CanyonReport/loadShiki.ts @@ -1,6 +1,7 @@ import { createHighlighterCore } from "shiki/core"; import getWasm from "shiki/wasm"; import lightplus from "shiki/themes/light-plus.mjs"; +import tokyoNight from "shiki/themes/tokyo-night.mjs"; import css from "shiki/langs/css.mjs"; import jscss from "shiki/langs/javascript.mjs"; import { createOnigurumaEngine } from "shiki/engine/oniguruma"; @@ -10,6 +11,7 @@ export const createHighlighterCoreInstance = async () => { themes: [ // 传入导入的包,而不是字符串 lightplus, + tokyoNight, ], langs: [css, jscss], // `shiki/wasm` contains the wasm binary inlined as base64 string.