Skip to content
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

Add support for web-types/custom-elements-json #2048

Open
mboudreau opened this issue Nov 28, 2019 · 10 comments · May be fixed by #2354
Open

Add support for web-types/custom-elements-json #2048

mboudreau opened this issue Nov 28, 2019 · 10 comments · May be fixed by #2354
Labels
Resolution: Refine This PR is marked for Jira refinement. We're not working on it - we're talking it through.

Comments

@mboudreau
Copy link

Stencil version:

 @stencil/core@1.8.0

I'm submitting a:

[ ] bug report
[X] feature request
[ ] support request => Please do not submit support requests here, use one of these channels: https://stencil-worldwide.herokuapp.com/ or https://forum.ionicframework.com/

Current behavior:
Stencil does not generate web-component metadata needed for IDEs to help with tag and attributes autocomplete

Expected behavior:
Generate metadata files as per specification then add "web-types": "dist/web-types.json" to package.json file

Steps to reproduce:
None

Related code:
None

Other information:
W3C is looking at the standard as we speak: https://github.com/webcomponents/custom-elements-json

@ionitron-bot ionitron-bot bot added the triage label Nov 28, 2019
@romulocintra
Copy link
Contributor

Not sure if this still works but i guess stencil was one of the first having it. Please have a look at 8924561

@runarberg
Copy link
Contributor

custom-elements.json is also used by storybook to gather documentation for each component.

runarberg pushed a commit to runarberg/stencil that referenced this issue Apr 8, 2020
runarberg pushed a commit to runarberg/stencil that referenced this issue Apr 11, 2020
runarberg pushed a commit to runarberg/stencil that referenced this issue Apr 11, 2020
runarberg pushed a commit to runarberg/stencil that referenced this issue Apr 14, 2020
runarberg pushed a commit to runarberg/stencil that referenced this issue Apr 14, 2020
@borisdiakur
Copy link

Not sure if this still works but i guess stencil was one of the first having it. Please have a look at 8924561

The docs-json target format unfortunately doesn't work with Intellij editors, as web-types uses a different schema. Though I've found that there has been done some work already transforming the docs-json target format into web-types format here: https://github.com/ionic-team/ionic-framework/pull/22428/files

@dmartinjs
Copy link

there is also an old PR #2354

And I'm using docs-custom to create the custom-elements-json file for storybook
as explain here #2354 (comment)

@runarberg
Copy link
Contributor

I’ve had a pretty good results with @pxtrn/storybook-addon-docs-stencil

@thepassle
Copy link

We recently released a v1.0.0 version of the Custom Elements Manifest schema, you can read more about the announcement here

We already added support for the v1 schema in Storybook, which is available in 6.4.0-alpha.8.

It'd be really great for the wider web component ecosystem to have Stencil tooling support outputting a custom-elements.json. There are already ongoing discussions on a reboot of webcomponents.org, or a new 'custom elements catalog', based on packages containing a custom-elements.json file. Skypack has also already committed to supporting the customElements property to allow easy searching of packages containing custom elements. The author of Api Viewer Element has also said he'd upgrade the component to support the V1 schema soon, and I'm sure a lot more CEM-related tooling will start to pop up soon.

I've been working on an analyzer to output a custom-elements.json, and it also supports Stencil: https://www.npmjs.com/package/@custom-elements-manifest/analyzer I'd be happy to help out for Stencil to support CEM 🙂

@marcomattes
Copy link

Would be very cool if this feature would come soon. Currently I can't use autocompletion or similar in my Angular project with an included stencil library in IntelliJ.

@rwaskiewicz rwaskiewicz added the Resolution: Needs Investigation This PR or Issue should be investigated from the Stencil team label Mar 25, 2022
@jared-christensen
Copy link

I would really like this for use with Storybook.

@rwaskiewicz rwaskiewicz added Resolution: Refine This PR is marked for Jira refinement. We're not working on it - we're talking it through. and removed Resolution: Needs Investigation This PR or Issue should be investigated from the Stencil team labels Jul 7, 2022
@nielsboogaard
Copy link

I've created a Web-Types generator which can be used together with the 'custom docs' functionality of StencilJS. See https://github.com/nielsboogaard/stenciljs-web-types-generator

@DmitryAvanesov
Copy link

Any updates on this issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Resolution: Refine This PR is marked for Jira refinement. We're not working on it - we're talking it through.
Projects
None yet
Development

Successfully merging a pull request may close this issue.