-
Notifications
You must be signed in to change notification settings - Fork 25
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
Custom elements without exports are not recognized #122
Comments
Hi @web-padawan I have the same problem after upgrading from v. 0.5.0 to the latest. Any tips? |
Hi, will look into this over the weekend. @rallets did you upgrade from |
@web-padawan no, I haven't noticed it was changed the analyzer! "@custom-elements-manifest/analyzer": "^0.5.7",
"web-component-analyzer": "^1.1.6" and I ran: "analyze": "cem analyze" using the config file export default {
globs: ['src/components/**/*.{js,ts}'],
outdir: './',
litelement: true,
plugins: [],
} that produce something like: {
"schemaVersion": "1.0.0",
"readme": "",
"modules": [
{
"kind": "javascript-module",
"path": "src/components/section-bar/section-bar-style.ts",
"declarations": [
{
"kind": "variable",
"name": "SectionBarStyle",
"type": {
"text": "array"
},
"default": "[theme, css`\r\n #container {\r\n display: flex;\r\n }\r\n`]"
}
],
"exports": [
{
"kind": "js",
"name": "SectionBarStyle",
"declaration": {
"name": "SectionBarStyle",
"module": "src/components/section-bar/section-bar-style.ts"
}
}
]
}
]
} but still renders I'm passing the full object to
btw do you know if "docs-md": "wca analyze \"src/**/*.{js,ts}\" --outFile custom-elements.md --format markdown" that it looks like |
I tried to use the json file you are using in the demo Let me know if you need more info. |
Sorry, I missed to document upgrading from 0.5.0. The property is now called |
@web-padawan switching to |
I tried it this way: <api-viewer
src="../custom-elements.json"
></api-viewer> And also this way: import manifest from '../custom-elements.json'
return html`
<api-viewer
.manifest="${manifest}"
></api-viewer>
` Unfortunately without luck. |
@baermathias Thanks for reminding, I will check your example in the evening. |
Tested locally with the JSON attached, and the problem seems to be related to following lines:
So, this is indeed a bug. I will try to find some time tomorrow to come up with a proper workaround. |
@web-padawan just wanted to hear if there was any progress with this issue? |
Sorry about the delay, I forgot to check this issue before the holidays and then it got lost in my backlog of things. |
Hi @baermathias, currently looking into this but so far I couldn't reproduce the issue using fixtures in the repo.
As you can see in 084207a, the export with |
In my case
<api-viewer>
is being rendered into the site, but it displays the following:What does the json file has to look like, so that custom elements are found inside it? Currently it looks like this:
The text was updated successfully, but these errors were encountered: