Skip to content

Commit

Permalink
docs: fix component registry
Browse files Browse the repository at this point in the history
  • Loading branch information
adrian-ub committed Nov 9, 2024
1 parent 228bf01 commit 7b43894
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion docs/src/__registry__/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ import { registry } from '../registry'
import { type Style, styles } from '../registry/registry-styles'
import { type Registry, registrySchema } from '../registry/schema'

const components = import.meta.glob(`../registry/**/**/*.ts`)

export const Index: Record<Style['name'], any> = {
'default': {},
'new-york': {},
Expand Down Expand Up @@ -45,13 +47,15 @@ async function buildRegistry(registry: Registry): Promise<void> {
}
}

const component = components[componentPath]

Index[style.name][item.name] = {
name: item.name,
description: item.description ?? '',
type: item.type,
registryDependencies: item.registryDependencies ?? [],
files: resolveFiles.map(file => file),
component: () => import(/* @vite-ignore */componentPath),
component,
source: sourceFilename,
category: item.category ?? '',
chunks: chunks.map(chunk => ({
Expand Down

0 comments on commit 7b43894

Please sign in to comment.