Skip to content

Commit

Permalink
fix: switch to shiki-es
Browse files Browse the repository at this point in the history
  • Loading branch information
Akryum committed Dec 3, 2022
1 parent fbb7908 commit 2a63502
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 20 deletions.
2 changes: 1 addition & 1 deletion packages/histoire-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"@histoire/vendors": "^0.11.8",
"@types/flexsearch": "^0.7.3",
"flexsearch": "0.7.21",
"shiki": "0.10.1"
"shiki-es": "^0.1.2"
},
"devDependencies": {
"@tailwindcss/typography": "^0.5.2",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<script lang="ts" setup>
import { computed, markRaw, nextTick, onMounted, ref, shallowRef, watch, watchEffect } from 'vue'
import { Icon } from '@iconify/vue'
import { getHighlighter, Highlighter, setCDN } from 'shiki'
import { getHighlighter, Highlighter } from 'shiki-es'
import { HstCopyIcon } from '@histoire/controls'
import { unindent } from '@histoire/shared'
// @ts-expect-error virtual module
Expand Down Expand Up @@ -84,7 +84,6 @@ const displayedSourceCode = computed(() => {
// HTML render
onMounted(async () => {
setCDN('https://unpkg.com/shiki@0.10.1/')
highlighter.value = await getHighlighter({
langs: [
'html',
Expand Down
2 changes: 1 addition & 1 deletion packages/histoire/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
"pathe": "^0.2.0",
"picocolors": "^1.0.0",
"sade": "^1.8.1",
"shiki": "0.10.1",
"shiki": "0.11.1",
"sirv": "^2.0.2",
"tinypool": "^0.1.2",
"vite-node": "0.23.4"
Expand Down
22 changes: 6 additions & 16 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 2a63502

Please sign in to comment.