Skip to content

Commit

Permalink
feat: provide slots, required, value and description meta
Browse files Browse the repository at this point in the history
  • Loading branch information
farnabaz committed Oct 13, 2021
1 parent 8b62256 commit 81b2a5c
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,16 @@ export default defineNuxtModule({
const data = await parse(component.filePath)
return {
name: component.pascalName,
description: data.description,
slots: data.slots,
props: (data.props || []).map(prop => {
return {
key: prop.name,
default: prop.defaultValue ? prop.defaultValue.value : undefined,
type: prop.type ? prop.type.name : undefined
type: prop.type ? prop.type.name : undefined,
required: prop.required,
values: prop.values,
description: prop.description
}
})
}
Expand Down

0 comments on commit 81b2a5c

Please sign in to comment.