reactjs / reactjs/react-docgen
React/TypeScript - Connecting components to Zeplin components failed.
オープン
まだ誰も着手していません。
typescript
- 主要言語
- TypeScript
- スター
- 3.8k
- フォーク
- 316
- 平均マージ
- 5時間 7分
- マージ済み PR(30日)
- 4
説明
Seems like I am having issues with ES6 imports, or TypeScript itself?
import React from "react";
import cls from "classnames";
import { IButtonProps } from "./types";
import "./Button.scss";
const baseclass = "button";
const Button = ({
...,
}: IButtonProps) => {
const classes = cls(
baseclass,
className,
...,
);
return (
<button
disabled={disabled}
className={classes}
type={type}
onClick={onClick}>
{children}
</button>
);
};
export default Button;
Results in following output issue:
Connecting components to Zeplin components failed.
Error occurred while processing src/components/atoms/Button/Button.tsx with @zeplin/cli-connect-react-plugin:
/Users/carlbowen/WebstormProjects/note/node_modules/@zeplin/cli-connect-react-plugin/dist/template/base.pug:18
16|
17| mixin propType(name, propType)
> 18| if propType.name === "union"
19| | #{name}={union[
20| +propertyValues(propType.value)
21| | }]
Cannot read property 'name' of undefined
My config file is as follows:
{
"plugins": [
{
"name": "@zeplin/cli-connect-react-plugin"
}
],
"projects": [],
"styleguides": [
"5cd486b18a..."
],
"components": [
{
"path": "src/components/atoms/Button/Button.tsx",
"zeplinNames": [
"Full Logo"
]
}
]
}
API versions in use:
"@zeplin/cli": "^1.0.0",
"@zeplin/cli-connect-react-plugin": "^0.2.3",
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
src/components/atoms/Button/Button.tsx、表示されている設定、および記載されている @zeplin CLI パッケージのバージョンを使って、まず接続失敗を再現します。plugin’s dist/template/base.pug の 18 行目付近を読み、そこに到達するコンポーネントメタデータを調査します。undefined propType エラーなしで Zeplin 接続が完了すれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- react, typescript
- 領域
- documentation, tooling
- issue の種類
- バグ
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- 説明が足りない
- 初心者へのやさしさ
- 25/100