reactjs / reactjs/react-docgen
react-docgen generates platform specific structure
Đang mở
Chưa có ai nhận issue này.
needs-discussion
- Ngôn ngữ chính
- TypeScript
- Star
- 3.8k
- Fork
- 316
- Merge trung bình
- 5 giờ 7 phút
- Pull request đã merge (30 ngày)
- 4
Mô tả
react-docgen --pretty -o lib/metadata.json src/components
On Windows produces:
{
"src\\components\\ExampleComponent.react.js": {
"description": "ExampleComponent is an example component.\r\nIt takes a single property, `label`, and\r\ndisplays it.",
"methods": [],
"props": {
"label": {
"type": {
"name": "string"
},
"required": true,
"description": "A label that will be printed when this component is rendered."
}
}
}
}
On Linux produces:
{
"src/components/ExampleComponent.react.js": {
"description": "ExampleComponent is an example component.\r\nIt takes a single property, `label`, and\r\ndisplays it.",
"methods": [],
"props": {
"label": {
"type": {
"name": "string"
},
"required": true,
"description": "A label that will be printed when this component is rendered."
}
}
}
}
This makes some scripts which use results of react-docgen for code generation fail. One example is plotly/dash component generator. Would you consider this is as a bug?
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Hướng nghiên cứu
Bắt đầu với lệnh gọi CLI của react-docgen bằng cách sử dụng src/components và lib/metadata.json, sau đó theo dõi nơi các đường dẫn thành phần được tuần tự hóa. So sánh các ví dụ trên Windows và Linux và làm cho các khóa được tạo không phụ thuộc vào nền tảng; xác minh rằng cả hai môi trường đều tạo ra cùng một cấu trúc.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- react
- Lĩnh vực
- cli
- Loại issue
- Lỗi
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- 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
- 45/100