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 a meta tag to indicate custom elements manifest location on webpage #70

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,14 @@ In order to allow tools to find npm packages with custom element manifests witho
}
```

## Referencing manifests from html pages

In order to allow tools that don't have access to the package.json property to discover the element manifests, a meta-tag should be used to indicate the location of the custom elements manifest:

```html
<meta name="custom-elements-manifest" content="custom-elements.json" />
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we need to answer the questions here: #71 (comment)

And I think a lot of the information in the manifest is likely to be invalid once deployed to pages (modules won't exist if the page has been bundled), plus there is missing information that's only available when you know the package or have the package.json, like the package name and version.

I'd personally like to see examples of this working before making a recommendation to do this, and then I suspect we'd need a lot more detail on how to set this up so that it actually works. I don't think just referencing a manifest from an npm package is going to work very often.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With the earlier discussion on the subject and seeing where the CEM is evolving, I too am starting to feel that this might not be an approach worth supporting. You make a great point in the fact that as the package gets deployed, it doesn't have the modules anymore as it most likely is bundled.

I remember the initial discussion for this was around the time people were thinking of ways to support CEM and discussions on how Web Component DevTools could utiize published CEM's. The approach WCDT went doesn't require published CEM's anymore, as it bundles the analyzer with itself, and trying to think of good usecases for these links to CEM on a HTML page, I can't really come up with any.

So I think this idea could be laid to rest and this PR and the linked issue could be closed for now.

```

## Schema Versioning

The schema has a `schemaVersion` field in the top-level object to facilitate
Expand Down