adobe / adobe/spectrum-web-components

Custom Elements Manifest

Open
#5,793 1 comment 0 reactions 0 assignees View on GitHub
Contribution Needs discussion needs-jira-ticket triage
Dominant language
TypeScript
Stars
1.5k
Forks
262
Avg merge
3d 10h
Merged PRs (30d)
68

Description

### Code of conduct

- [x] I agree to follow this project's code of conduct.

### Description of issue

### The problem

[Custom Elements Manifest](https://custom-elements-manifest.open-wc.org/) 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.
```js
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!

Contributor guide

Open the contributing guide

Research direction

Start by reviewing the repository's package build process and package metadata, using the provided Custom Elements Manifest configuration and the referenced build.js and package.json examples as guides. Done means generating the manifest during the build and including and exposing it in the published npm package.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
build-system, release
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.