feat: Custom Elements Manifest

Aperta
#30,715 0 commenti 1 reazione 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
42/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
typescript
Ambito
tooling, web-dev

Direzione di ricerca

Start by reviewing the core/src/components/**/*.tsx scope and the build process that produces the npm package. Compare the proposed exclusions and output settings with the package's existing published files and package.json exposure. Done means a Custom Elements Manifest is generated during the build and included and exposed in the npm package.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

type: feature request
Prerequisites
Describe the Feature Request

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.

Describe the Use Case

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.

Describe Preferred 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.

{
  "globs": [
    "core/src/components/**/*.tsx"
  ],
  "exclude": [
    "**/*.test.tsx",
    "**/*.spec.tsx",
    "**/test/**/*",
    "**/tests/**/*",
    "**/*.stories.tsx"
  ],
  "outdir": ".",
  "plugins": []
}

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

Describe Alternatives

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

Related Code

No response

Additional Information

No response

Lingua principale
TypeScript
Stelle
52.8k
Fork
13.3k
Merge medio
3g 1h
PR unite (30g)
86

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di ionic-team/ionic-framework

Tutte le issue di ionic-team/ionic-framework

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.