make react JSX transformer more generic and allow JSX comments - closes #841
This commit is contained in:
8
test/fixtures/transformation/react/honor-custom-jsx-comment/actual.js
vendored
Normal file
8
test/fixtures/transformation/react/honor-custom-jsx-comment/actual.js
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
/** @jsx dom */
|
||||
|
||||
<Foo></Foo>;
|
||||
|
||||
var profile = <div>
|
||||
<img src="avatar.png" className="profile" />
|
||||
<h3>{[user.firstName, user.lastName].join(" ")}</h3>
|
||||
</div>;
|
||||
14
test/fixtures/transformation/react/honor-custom-jsx-comment/expected.js
vendored
Normal file
14
test/fixtures/transformation/react/honor-custom-jsx-comment/expected.js
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
/** @jsx dom */
|
||||
|
||||
dom(Foo, null);
|
||||
|
||||
var profile = dom(
|
||||
"div",
|
||||
null,
|
||||
dom("img", { src: "avatar.png", className: "profile" }),
|
||||
dom(
|
||||
"h3",
|
||||
null,
|
||||
[user.firstName, user.lastName].join(" ")
|
||||
)
|
||||
);
|
||||
Reference in New Issue
Block a user