Skip to content

Custom Elements Manifest #5793

@jackhp95

Description

@jackhp95

Code of conduct

  • I agree to follow this project's code of conduct.

Description of issue

The problem

Custom Elements Manifest is a file format that describes custom elements. This format will allow tooling and IDEs to give rich information about the custom elements in a given project.

Personally, I'm using this file format to generate friendly wrappers and documentation for all of these web components in elm code.

I think it'd be a worthwhile addition to your npm package. I won't bother opening a PR unless y'all agree.

The solution

It's a straightforward CLI command that can be added to the build process.
Adding the generated file to the npm package, and exposing it will do the trick.

export default {
  "globs": ["packages/*/src/**/*.ts"],
  "outdir": ".",
  "litelement": true,
  "plugins": []
};

I used the above config in your codebase to generate what I needed.

Examples

Here's an example of using the CLI command in a build script:
https://github.com/quietui/quiet/blob/next/scripts/build.js#L61C1-L77C2

Exposing the file:
https://github.com/quietui/quiet/blob/next/package.json#L48

The exposed file:
https://www.npmjs.com/package/@quietui/quiet-browser?activeTab=code

Would you like to track this issue in Jira?

  • Yes, please tell me the ticket number!

Metadata

Metadata

Assignees

No one assigned

    Labels

    ContributionPRs from contributorsNeeds discussionProposed UX or spec changes requiring discussion w/ internal teamneeds jira ticketIssue has yet to be imported to JiratriageAn issue needing triage

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions