open-wc / custom-elements-manifest-deprecated

Custom Elements Manifest is a file format that describes custom elements in your project.
8 stars 4 forks source link

Question: Does/could the manifest-to-markdown package allow for the creation of custom sections? #59

Open michaelwarren1106 opened 3 years ago

michaelwarren1106 commented 3 years ago

For example, if I wanted to separate out certain properties as special ones, maybe even by adding a special jsdoc-like indicator (like @specialProp or something) how might i go about making a custom section in the produced markdown?

The use case I have is that my web components have what I call "Internal Access properties" that give consumers of the components direct access to certain important DOM elements directly rather than them having to crawl the internal shadowRoot with nested querySelectors. It would be awesome if i could specify some tag on those properties and have them get broken out into their own special category section with a name and table columns I could specify add to, etc.

thepassle commented 3 years ago

Currently this is not possible (the render to markdown functionality is pretty basic right now), but I think this is a good usecase, we could probably accept a callback or some kind of 'plugin' functionality to customise the markdown output 👍

michaelwarren1106 commented 3 years ago

Awesome, i wouldn't mind trying to dig in there a little bit since the usecase is definitely something that we would need. I'll see if i've got some time to devote to poking around the code and seeing how i might get something at least functional

the other thing i wanted to mention, but wasnt sure which package would be best to suggest it for is a CLI option in the analyze tool for generating the markdown from the toMarkdown package directly. I currently use wca and use the markdown option pretty extensively so that would help this new pkg be a replacement for wca for me.