Skip to content

Commit

Permalink
docs: Configration for docgen
Browse files Browse the repository at this point in the history
  • Loading branch information
OssamaSijbesma committed Sep 7, 2023
1 parent c28e680 commit 9eb3203
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 24 deletions.
22 changes: 10 additions & 12 deletions code/addons/docs/vue/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,24 +36,22 @@ export default {

## Preset options

The `addon-docs` preset for Vue has a configuration option that can be used to configure [`vue-docgen-api`](https://github.com/vue-styleguidist/vue-styleguidist/tree/dev/packages/vue-docgen-api), a tool which extracts information from Vue components. Here's an example of how to use the preset with options for Vue app:
The `framework` preset for Vue has a configuration option that can be used to configure [`vue-docgen-api`](https://github.com/vue-styleguidist/vue-styleguidist/tree/dev/packages/vue-docgen-api), a tool which extracts information from Vue components. Here's an example of how to use the preset with options for Vue app:

```js
import * as path from 'path';

export default {
addons: [
{
name: '@storybook/addon-docs',
options: {
vueDocgenOptions: {
alias: {
'@': path.resolve(__dirname, '../'),
},
},
},
framework: {
name: '@storybook/vue-vite',
options: {
docgenOptions: {
alias: {
'@': path.resolve(__dirname, '../'),
}
}
},
],
},
};
```

Expand Down
22 changes: 10 additions & 12 deletions code/addons/docs/vue3/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,24 +36,22 @@ export default {

## Preset options

The `addon-docs` preset for Vue has a configuration option that can be used to configure [`vue-docgen-api`](https://github.com/vue-styleguidist/vue-styleguidist/tree/dev/packages/vue-docgen-api), a tool which extracts information from Vue components. Here's an example of how to use the preset with options for Vue app:
The `framework` preset for Vue has a configuration option that can be used to configure [`vue-docgen-api`](https://github.com/vue-styleguidist/vue-styleguidist/tree/dev/packages/vue-docgen-api), a tool which extracts information from Vue components. Here's an example of how to use the preset with options for Vue app:

```js
import * as path from 'path';

export default {
addons: [
{
name: '@storybook/addon-docs',
options: {
vueDocgenOptions: {
alias: {
'@': path.resolve(__dirname, '../'),
},
},
},
framework: {
name: '@storybook/vue3-vite',
options: {
docgenOptions: {
alias: {
'@': path.resolve(__dirname, '../'),
}
}
},
],
},
};
```

Expand Down

0 comments on commit 9eb3203

Please sign in to comment.