runem / web-component-analyzer

CLI that analyzes web components and emits documentation
https://runem.github.io/web-component-analyzer
MIT License
501 stars 63 forks source link

Improve output for union type aliases #142

Closed telpalbrox closed 4 years ago

telpalbrox commented 4 years ago

Context #140

I am not sure if this is the best way.
I also updated the lit-element example to be able to test it. I was not sure how to add unit tests for this change, so feel free to guide me about how to add them! Thank you for your time 😄

runem commented 4 years ago

Thank you so much for this PR! I think it's a great addition to WCA :tada:

I've now reviewed the PR and I only have one small change that I would like to see :-)

After this has been merged, I will add unit tests and a CLI option to disable this behavior. I will also make sure to make a guide on how to add unit tests :+1:

telpalbrox commented 4 years ago

@runem Thank you for taking the time to take a look to this! I after it is merged I will take a look at how you add the CLI option and how you add unit test 😄

runem commented 4 years ago

I'l merge this PR now, - sorry for the delay :-)

I chose to implement the feature behind a flag called --inline-types so we don't have to introduce a breaking change. I'll implement the flag after this merge. In addition, this option might in the future only apply to the markdown output (and not the json format).