webcomponents / custom-elements-manifest

A file format for describing custom elements
BSD 3-Clause "New" or "Revised" License
350 stars 26 forks source link

Standardize a npm package.json field #29

Closed justinfagnani closed 3 years ago

justinfagnani commented 3 years ago

We should standardize on a package.json field to use to point to a custom elements manifest. This is important for indexers and catalogs that might need to inspect npm package for custom elements. The npm registry API allows callers to fetch the package.json metadata without fetching and unpacking the package's tarball.

justinfagnani commented 3 years ago

One idea from #22 is customElementsManifest

castastrophe commented 3 years ago

I know this isn't a huge concern because package.json keys are English but how well does manifest translate? I'm just noodling if there is a clearer word for a wider audience. 🤔

Definition might be too vague.

At least manifest is used elsewhere in JavaScript so maybe it won't feel foreign even if it didn't translate.

justinfagnani commented 3 years ago

In #50 I went with just "customElements" as the field name, because that's as short as it can be and still be obvious.

thepassle commented 3 years ago

fwiw I felt like customElementsManifest was a bit more explicit. Thats also how currently its implemented in the analyzer, and Lion components

justinfagnani commented 3 years ago

hmm... the Manifest part just seems a bit unnecessary, just like "types" could have been "typeDeclarations", but "types" is shorter.