-
Notifications
You must be signed in to change notification settings - Fork 8
feat: add support for arrays as children #4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
@theianjones I liked your implementation too 👏🏼 Look for my review inline. |
|
@texastoland I dont see a review |
src/index.js
Outdated
| delete child.name; | ||
| } | ||
| else { | ||
| } else { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you not have the Prettier extension installed? Make sure to add an .editorconfig to keep tabs (you mixed them throughout).
src/index.js
Outdated
| if(obj[name]){ | ||
| obj[name] = [obj[name], child].flat() | ||
| } else { | ||
| obj[name] = child; | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I might not have thought of flat 🤩
| if(obj[name]){ | |
| obj[name] = [obj[name], child].flat() | |
| } else { | |
| obj[name] = child; | |
| } | |
| obj[name] = obj[name] ? [obj[name], child].flat() : child |
test/index.js
Outdated
| <entry path="src/index.js" /> | ||
| <resolve> | ||
| <alias from="react-dom" to="preact-compat" /> | ||
| </resolve> | ||
| <plugins> | ||
| <uglify-js opts={{ | ||
| compression: true, | ||
| mangle: false, | ||
| }} /> | ||
| <CustomPlugin foo="bar" /> | ||
| </plugins> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unintentional whitespace changes hurt the diff.
| "alias": [ | ||
| { | ||
| "from": "react", | ||
| "to": "preact-compat" | ||
| }, | ||
| { | ||
| "from": "react-dom", | ||
| "to": "preact-compat" | ||
| } | ||
| ] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Readme needs updated too 👏🏼
resolves #3