reactjs / reactjs/react-docgen
react-docgen generates platform specific structure
オープン
まだ誰も着手していません。
needs-discussion
- 主要言語
- TypeScript
- スター
- 3.8k
- フォーク
- 316
- 平均マージ
- 5時間 7分
- マージ済み PR(30日)
- 4
説明
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?
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
src/components と lib/metadata.json を使用する react-docgen CLI の呼び出しから始め、次にコンポーネントパスがどこでシリアライズされるかを追跡します。Windows と Linux の例を比較し、生成されるキーをプラットフォームに依存しないものにしてください。両方の環境で同じ構造が生成されることを確認します。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- react
- 領域
- cli
- issue の種類
- バグ
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 45/100