runem / web-component-analyzer

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

Adds support for reflect in lit property config & outputs in JSON. #120

Closed aarondrabeck closed 2 years ago

runem commented 4 years ago

Thanks for this contribution :-)

I'm a bit hesitant to merge this without having a discussion about the field type and what it means that reflect is true in custom-elements.json. It might need to be a bit more fine-grained than that, such as reflect: <"both"|"to-attribute"|"to-property">. For example, in reality a LitElement-controlled property is "to-property" per default and would become "both" when setting reflect: true in the property decorator.

It might also be valuable to start the discussion here: https://github.com/webcomponents/custom-elements-json