ionic-team / ionic-team/ionic-framework
feat: Custom Elements Manifest
- Ngôn ngữ chính
- TypeScript
- Star
- 52.7k
- Fork
- 13.3k
- Merge trung bình
- 1 ngày 15 giờ
- Pull request đã merge (30 ngày)
- 51
Mô tả
### Prerequisites
- [x] I have read the [Contributing Guidelines](https://github.com/ionic-team/ionic-framework/blob/main/docs/CONTRIBUTING.md#creating-an-issue).
- [x] I agree to follow the [Code of Conduct](https://ionicframework.com/code-of-conduct).
- [x] I have searched for [existing issues](https://github.com/ionic-team/ionic-framework/issues) that already include this feature request, without success.
### Describe the Feature Request
[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.
### 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.
```json
{
"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_
Hướng dẫn đóng góp
Hướng nghiên cứu
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.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- typescript
- Lĩnh vực
- tooling, web-dev
- Loại issue
- Tính năng
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 42/100