web-component-analyzer
web-component-analyzer copied to clipboard
Support for lit 2 components?
Does this tool already support lit 2.x
?
If I run wca analyze
on a project which uses new lit version and does the import statements like below, then it doesn't create the custom-elements.json
, but also gives no error message:
import { css, html, LitElement, TemplateResult } from 'lit'
import { property } from 'lit/decorators.js'
But if I run it on a project where files are imported from lit-element
, it creates the custom-elements.json
and describes the properties, attributes and events.
import { html, LitElement, TemplateResult, state, property, customElement, css } from 'lit-element'
Based on my test it appears to work for lit^2.3.1
We're just in the process of upgrading to lit v2 and use this library. Our usage of the analyzer does not appear to have been broken
PR upgrading to lit 2 https://github.com/microsoftgraph/microsoft-graph-toolkit/pull/1810
If you use yarn to install the dep and then run yarn build:mgt-react
from the root you'll see /packages/mgt-react/temp/web-components.json
is generated as expected