developit / developit/jsxobj

Support single element or top level arrays

Đang mở
#5 0 bình luận 1 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
JavaScript
Star
221
Fork
8
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

Building on @theianjones's proposal in #3.

> 1 open question is how to represent an array with a single element. The only idea I had was fragments like `<>...`. But that would be a separate PR anyway.

Given a component-like function:

```jsx
const Aliases = () => (
<>



)
```

Expect ``:

```json5
[
{
// name: "alias",?
from: "react",
to: "preact-compat",
},
{
// name: "alias",?
from: "react-dom",
to: "preact-compat",
},
]
```

Given:

```jsx
const Resolve = () => (

<>



)
```

Expect ``:

```json5
{
name: "resolve",
alias: [
{
from: "react-dom",
to: "preact-compat",
},
],
}
```

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.