vue-docgen-api doesn't support mixins which are result of function execution
See original GitHub issueHi, I’m trying to use vue-styleguidist in a project which uses next pattern for mixins
// mixin.js
const factory = () => Vue.extend({});
export default factory();
// component.vue
<script>
import Vue from 'vue';
import mixin from './mixin';
export default Vue.extend({
name: 'example',
mixins: [
mixin
]
});
</script>
All these components will be ignored by vue-docgen-api The same issues happens for nested extend like
// component.vue
<script>
import Vue from 'vue';
export default Vue.extend().extend({
name: 'example2',
});
</script>
Do you think these cases should be covered as well? And do you have plans to implement this functionality?
Thanks, Sergey
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:7 (3 by maintainers)
Top Results From Across the Web
vue-docgen-api - Vue Styleguidist
Every parser in docgen-api returns an instance of ComponentDoc or a ComponentDoc[] . interface ComponentDoc { /** * Usual name of the component:...
Read more >Specific vue mixin function doesn't get executed - Stack Overflow
I am using Vue.js with global functions which I have definied under Vue mixin . In my component I call different functions from...
Read more >vue-docgen-api - npm
vue -docgen-api is a toolbox to help extracting information from Vue components, and generate documentation from it.
Read more >list of all node.js modules created on June 24, 2013
=joostdevries 2012-11-25 13:26 0.2.1 async-memo Call a function at most once and remember the result. Args are not supported =eldar 2013-06-08 14:52 0.0.1 ......
Read more >The Future of Continuing Education - Masterplan.com
@babel/helper-member-expression-to-functions plus ... @babel/plugin-proposal-do-expressions plus ... vue-docgen-api plus. vue-docgen-loader plus.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Thanks for reopening the issue. I’ll describe my use case below.
I have a mixin named
CustomTagProviderwhich I use to provide atagprop to components so users can choose to render their root elements using a custom html tag. I want the default value oftagto be able to be varied based on which component this mixin is applied on.mixins/CustomTagProvider.js
Hello @kyleoliveiro, Hello @steplov,
vue-docgen-api, since version 4.27.0 can extract some information from mixins factories (functions returning a mixin).
Hope this works for you, if not, please feel free to re-open this issue 😉