-
Notifications
You must be signed in to change notification settings - Fork 65
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[WIP] Implement new experimental JSON schema #157
base: master
Are you sure you want to change the base?
Conversation
Here is an update of what TODO's are still needed on my side: There are still some things that have not been implemented yet, specifically: TODO: (updated to reflect newest changes to
I will be focusing a bit more on |
6f108e5
to
c768a8f
Compare
ad0910b
to
d802a91
Compare
I think the |
I implemented most of what's in the updated schema. While implementing the changes, I wrote down a couple of questions that I would like to discuss.
Right now, WCA doesn't properly include mixins in the output because it must be extended to analyze and understand mixins in another way. Mixins are only analyzed while traversing inheritance starting from custom element class declarations, but should be extended to analyze all mixins tagged with the |
I think it should still be
If the type is local in the current module, then the
I think we should align in this case and name it
Can you make a PR
Perhaps we should use a convention like
Because events can have types
If its a mixin it should be a MixinDeclaration.
Im not sure what you mean here, can you elaborate? The Mixins fields should be applied to the class that uses the Mixin, right? Not the other way around |
Thanks for starting the implementation @runem! @thepassle's answers are great here. A few things:
|
@runem I just made a PR for mixins that includes a comment on how to structure them: webcomponents/custom-elements-manifest#31 |
This PR implements the proposed JSON schema found here as a new experimental output format called
json2
.I will have to make some more changes to the internal data structure in order to better output this schema.
You can test it at the playground here: https://runem.github.io/web-component-analyzer/?format=json2. I will make sure to update the playground when I finish more parts of the schema.
You can also clone this repo, build it and run
./cli.js ./dev/src/custom-element/custom-element.ts --format json2
. I might publish as beta version on NPM soon.While implementing this I wrote down some questions and considerations which I will add to the discussion at webcomponents/custom-elements-manifest#9 during this week :-)