Skip to content

Commit

Permalink
chore(docs): register all discue ui components
Browse files Browse the repository at this point in the history
  • Loading branch information
stfsy committed May 11, 2022
1 parent de73e35 commit cf96fc8
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
4 changes: 4 additions & 0 deletions docs/.vuepress/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -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'],
Expand Down
12 changes: 12 additions & 0 deletions docs/.vuepress/enhance/clientAppEnhance.js
Original file line number Diff line number Diff line change
@@ -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)
})
})

0 comments on commit cf96fc8

Please sign in to comment.