rfcs icon indicating copy to clipboard operation
rfcs copied to clipboard

API Docs Standardisation

Open sustained opened this issue 5 years ago • 5 comments
trafficstars

Rendered

This RFC relates to the inconsistencies/lack of cohesion between the different VuePress-based API docs for Vue, Vuex, Vue Router, Vue CLI etc.

sustained avatar Jan 29 '20 16:01 sustained

This is definitely a good area for improvement (especially as we are reworking the core docs for v3).

We will most likely explore generating API references automatically from TS typings (we can already generate api.json files using api-extractor for vue-next). Once we find that working well we can apply that workflow to sub projects as well.

yyx990803 avatar Jan 29 '20 17:01 yyx990803

Thanks for the response.

That sounds promising, I will definitely have to take a closer look at this "api-extractor" and the JSON it generates for vue-next. Just to clarify, you are referring to this Microsoft tool, yes?

sustained avatar Jan 29 '20 17:01 sustained

@sustained yes, vue-next uses it to rollup types and extract API metadata.

yyx990803 avatar Jan 29 '20 20:01 yyx990803

@yyx990803 I think people would also appreciate if Vue 3 docs had examples written both in JS and TS, where you could toggle between those two.

CyberAP avatar Jan 29 '20 23:01 CyberAP

@CyberAP TS code and JS code will look almost the same as most of the APIs provide decent inference.

yyx990803 avatar Jan 30 '20 01:01 yyx990803