web-component-analyzer icon indicating copy to clipboard operation
web-component-analyzer copied to clipboard

[feature] append to readme instead of create the whole thing

Open michaelwarren1106 opened this issue 5 years ago • 2 comments

Imo, It would be great to have a feature when your output is markdown and going to some readme file, that you could just append the content generated by WCA instead of recreating the whole file.

I have a ton of "usage examples" of my components, and having them in plain markdown is an easier read than having them in a jsdoc style comment in the code.

Imo, if you added a default tag like <<WCACONTENT>> then replaced that content in the target MD file instead of recreating the whole file, that would be great!

michaelwarren1106 avatar Apr 15 '20 15:04 michaelwarren1106

I would propose a solution where the generated markdown is appended after a certain "magic comment" such as

My written documentation

<!-- wca -->

Generated by web-component-analyzer

Everything after the comment would get replaced on subsequent runs of wca

tpluscode avatar Oct 25 '20 20:10 tpluscode

Magic comments would be ideal also. To go even further if there were several magic comments such as one each for methods, props, events, etc that would give the absolute most flexibility for devs to structure their docs how they see fit using the info/analysis provided by wca

michaelwarren1106 avatar Oct 25 '20 22:10 michaelwarren1106