feat: Custom Elements Manifest

未关闭
#30,715 0 条评论 1 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
42/100
Issue 类型
功能
描述清晰度
基本清楚
活跃度
停滞
技术栈
typescript
领域
tooling, web-dev

调研方向

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.

由索引模型根据 Issue 内容生成。

描述

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

主要语言
TypeScript
星标
52.8k
派生
13.3k
平均合并
3 天 1 小时
30 天内合并 PR
86

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

ionic-team/ionic-framework 的其他 Issue

查看 ionic-team/ionic-framework 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。