vitejs / vite-plugin-vue

Vite Vue Plugins
MIT License
499 stars 154 forks source link

Add API generator as JSON meta files #239

Open jourdain opened 1 year ago

jourdain commented 1 year ago

Related plugins

Description

As a developer using Vite and Vue, I would love to see a plugin that would be able to extract the API of my components and expose them in a standard way using some kind of JSON/YAML files.

Basically I would love to see a standard emerge that capture similar information as you can see with vuetify or quasar but ideally such API description should become a standard rather than a custom format for each library.

Also ideally once such format became a standard, we could envision website generators using that as input for API documentation.

Suggested solution

Alternative

No response

Additional context

No response

Validations

jourdain commented 1 year ago

Sorry for the cross posting but I initially suggested here in the vite project. But it better match the vue plugin...

sxzz commented 1 year ago

Thanks for your idea. We actually already have vue-component-meta in Volar.

I think it would be better to have this feature in the community project than in the official plugin for now.

jourdain commented 1 year ago

Thanks for the pointer. I'm still not sure how to use it on existing vue.js bundles but definitely a step toward the end goal.

Ideally, I would love to see it become a standard practice, hence having it provided at the core would help the adoption unless similar capabilities could be derived from a generated umd.

To be fully transparent, I'm looking to streamline the integration process of any vue.js library out there into a trame component by generating the corresponding Python code via some automation tool. So anything that could extract props/events/docs/directive information into a usable form would go a long way...

Thanks again for getting back to me about that suggestion.