diff --git a/packages/histoire/package.json b/packages/histoire/package.json index 18240e72..19b81f51 100644 --- a/packages/histoire/package.json +++ b/packages/histoire/package.json @@ -43,6 +43,7 @@ "pathe": "^0.2.0", "pinia": "^2.0.10", "sade": "^1.8.1", + "shiki": "^0.10.0", "vite": "^2.7.13", "vue": "^3.2.27", "vue-router": "^4.0.0" diff --git a/packages/histoire/src/client/app/codegen/vue3.ts b/packages/histoire/src/client/app/codegen/vue3.ts index 740926f6..1b77a8f1 100644 --- a/packages/histoire/src/client/app/codegen/vue3.ts +++ b/packages/histoire/src/client/app/codegen/vue3.ts @@ -15,7 +15,7 @@ export async function generateSourceCode (vnode: VNode | VNode[]) { return lines.join('\n') } -async function printVNode (vnode: VNode) { +async function printVNode (vnode: VNode): Promise { if (vnode.type === Text) { return [vnode.children.trim()] } diff --git a/packages/histoire/src/client/app/components/StorySourceCode.vue b/packages/histoire/src/client/app/components/StorySourceCode.vue index 38a9faf8..c50abff5 100644 --- a/packages/histoire/src/client/app/components/StorySourceCode.vue +++ b/packages/histoire/src/client/app/components/StorySourceCode.vue @@ -1,7 +1,9 @@