From cf96fc81b42ea4df052412c8a5d26e494bca1113 Mon Sep 17 00:00:00 2001 From: Stefan Pfaffel Date: Wed, 11 May 2022 11:26:35 +0200 Subject: [PATCH] chore(docs): register all discue ui components --- docs/.vuepress/config.js | 4 ++++ docs/.vuepress/enhance/clientAppEnhance.js | 12 ++++++++++++ 2 files changed, 16 insertions(+) create mode 100644 docs/.vuepress/enhance/clientAppEnhance.js diff --git a/docs/.vuepress/config.js b/docs/.vuepress/config.js index e7afd1c..e679de3 100644 --- a/docs/.vuepress/config.js +++ b/docs/.vuepress/config.js @@ -79,6 +79,10 @@ module.exports = { // theme: 'material-default' // }], ], + clientAppEnhanceFiles: path.resolve( + __dirname, + './enhance/clientAppEnhance.js' + ), extendsMarkdown: (md) => { md.use(require('markdown-it-attrs'), { allowedAttributes: ['id'], diff --git a/docs/.vuepress/enhance/clientAppEnhance.js b/docs/.vuepress/enhance/clientAppEnhance.js new file mode 100644 index 0000000..42ac9b2 --- /dev/null +++ b/docs/.vuepress/enhance/clientAppEnhance.js @@ -0,0 +1,12 @@ +import * as components from '@discue/ui-components' +import * as internalComponents from "@discue/ui-components/internal" +import { defineClientAppEnhance } from '@vuepress/client' + +export default defineClientAppEnhance(({ app }) => { + Object.entries(components).forEach(([key, value]) => { + app.component(key, value) + }) + Object.entries(internalComponents).forEach(([key, value]) => { + app.component(key, value) + }) +}) \ No newline at end of file