Skip to content

Commit

Permalink
chore(#154): update documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
Decipher committed Jul 12, 2022
1 parent f8eedb9 commit ecf83b5
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 7 deletions.
4 changes: 2 additions & 2 deletions packages/breadcrumb/src/components/DruxtBreadcrumb.vue
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export default {
* @type {boolean}
* @default true
* @example @lang vue
* <DruxtBreacrumb :home="false" />
* <DruxtBreadcrumb :home="false" />
*/
home: {
type: Boolean,
Expand All @@ -59,7 +59,7 @@ export default {
* @type {string}
*
* @example @lang vue
* <DruxtBreacrumb path="/node/1" />
* <DruxtBreadcrumb path="/node/1" />
*/
path: {
type: String,
Expand Down
12 changes: 8 additions & 4 deletions packages/docgen/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ class DruxtDocgen {
// Javascript.
'packages/*/src/**/*.js',
// Vue.js.
'packages/*/src/components/**/*.vue',
'packages/*/src/**/*.vue',
// Exclude fixtures, mocks and tests.
'!**/__*__/**/*',
])
Expand Down Expand Up @@ -216,15 +216,19 @@ _Note: The contents of this file where automatically generated by the [Druxt Doc
const prefixId = (templateData[0] || {}).id || ''
// Props.
for (const prop of (data.props || []).filter((prop) => !templateData.map((o) => o.id).includes(`${prefixId}.props.${prop.name}`))) {
templateData.push({
const item = {
id: `${prefixId}.props.${prop.name}`,
longname: `${prefixId}.props.${prop.name}`,
name: prop.name,
kind: 'member',
scope: 'static',
description: prop.description,
memberof: `${prefixId}.props`
})
memberof: `${prefixId}.props`,
}
if ((prop.tags || {}).example) {
item.examples = [prop.tags.example[0].description.replace('DruxtModule', prefixId.split(':')[1])]
}
templateData.push(item)
}

templateData.map(item => {
Expand Down
13 changes: 12 additions & 1 deletion packages/druxt/src/components/DruxtModule.vue
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,25 @@ export default {
props: {
/**
* The resource langcode.
*
* @example
* <DruxtModule langcode="en" />
*
* @type {String}
*/
langcode: {
type: String,
default: undefined
},
/**
* The module value.
* The module component model value.
*
* Used to bypass the Drupal JSON:API fetch, setting the module data
* directly.
*
* @example
* <DruxtModule v-model="{ foo: bar }" />
*
* @type {(Array|Boolean|Date|Number|Object|String)}
* @model
Expand Down

0 comments on commit ecf83b5

Please sign in to comment.