Revert "remove jsx and react transformers"
This reverts commit 4241227dbe.
This commit is contained in:
3
test/fixtures/syntax/jsx/annotation/actual.js
vendored
Normal file
3
test/fixtures/syntax/jsx/annotation/actual.js
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
/** @jsx CUSTOM_DOM */
|
||||
|
||||
<a></a>
|
||||
2
test/fixtures/syntax/jsx/annotation/expected.js
vendored
Normal file
2
test/fixtures/syntax/jsx/annotation/expected.js
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
"use strict";
|
||||
CUSTOM_DOM.a(null);
|
||||
1
test/fixtures/syntax/jsx/empty/actual.js
vendored
Normal file
1
test/fixtures/syntax/jsx/empty/actual.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
<x>{}</x>
|
||||
2
test/fixtures/syntax/jsx/empty/expected.js
vendored
Normal file
2
test/fixtures/syntax/jsx/empty/expected.js
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
"use strict";
|
||||
x(null, null);
|
||||
2
test/fixtures/syntax/jsx/everything/actual.js
vendored
Normal file
2
test/fixtures/syntax/jsx/everything/actual.js
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
<X data-prop={x ? <Y prop={2} /> : <Z>
|
||||
</Z>}></X>
|
||||
7
test/fixtures/syntax/jsx/everything/expected.js
vendored
Normal file
7
test/fixtures/syntax/jsx/everything/expected.js
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
"use strict";
|
||||
|
||||
X({
|
||||
"data-prop": (x ? Y({
|
||||
prop: 2
|
||||
}) : Z(null, "\n"))
|
||||
});
|
||||
5
test/fixtures/syntax/jsx/expressions/actual.js
vendored
Normal file
5
test/fixtures/syntax/jsx/expressions/actual.js
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
(<X>{a}</X>);
|
||||
|
||||
(<X>{a} {b}</X>);
|
||||
|
||||
(<X prop={a} yes></X>);
|
||||
8
test/fixtures/syntax/jsx/expressions/expected.js
vendored
Normal file
8
test/fixtures/syntax/jsx/expressions/expected.js
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
"use strict";
|
||||
X(null, a);
|
||||
X(null, [a, " ", b]);
|
||||
|
||||
X({
|
||||
prop: a,
|
||||
yes: true
|
||||
});
|
||||
1
test/fixtures/syntax/jsx/known-tags/actual.js
vendored
Normal file
1
test/fixtures/syntax/jsx/known-tags/actual.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
<a></a>
|
||||
2
test/fixtures/syntax/jsx/known-tags/expected.js
vendored
Normal file
2
test/fixtures/syntax/jsx/known-tags/expected.js
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
"use strict";
|
||||
React.DOM.a(null);
|
||||
1
test/fixtures/syntax/jsx/member-expression/actual.js
vendored
Normal file
1
test/fixtures/syntax/jsx/member-expression/actual.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
<Test.X></Test.X>
|
||||
2
test/fixtures/syntax/jsx/member-expression/expected.js
vendored
Normal file
2
test/fixtures/syntax/jsx/member-expression/expected.js
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
"use strict";
|
||||
Test.X(null);
|
||||
1
test/fixtures/syntax/jsx/no-xml-namespaces/actual.js
vendored
Normal file
1
test/fixtures/syntax/jsx/no-xml-namespaces/actual.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
<Test:X></Test:X>
|
||||
3
test/fixtures/syntax/jsx/no-xml-namespaces/options.json
vendored
Normal file
3
test/fixtures/syntax/jsx/no-xml-namespaces/options.json
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"throws": "Namespace tags are not supported. ReactJSX is not XML."
|
||||
}
|
||||
3
test/fixtures/syntax/jsx/self-closing-tags/actual.js
vendored
Normal file
3
test/fixtures/syntax/jsx/self-closing-tags/actual.js
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
(<X />);
|
||||
|
||||
(<X prop="1" />);
|
||||
6
test/fixtures/syntax/jsx/self-closing-tags/expected.js
vendored
Normal file
6
test/fixtures/syntax/jsx/self-closing-tags/expected.js
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
"use strict";
|
||||
X(null);
|
||||
|
||||
X({
|
||||
prop: "1"
|
||||
});
|
||||
1
test/fixtures/syntax/jsx/simple-tags/actual.js
vendored
Normal file
1
test/fixtures/syntax/jsx/simple-tags/actual.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
<X></X>
|
||||
2
test/fixtures/syntax/jsx/simple-tags/expected.js
vendored
Normal file
2
test/fixtures/syntax/jsx/simple-tags/expected.js
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
"use strict";
|
||||
X(null);
|
||||
3
test/fixtures/syntax/jsx/tags-with-children/actual.js
vendored
Normal file
3
test/fixtures/syntax/jsx/tags-with-children/actual.js
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
(<X prop="2"><Y /></X>);
|
||||
|
||||
(<X prop="2"><Y /><Z /></X>);
|
||||
9
test/fixtures/syntax/jsx/tags-with-children/expected.js
vendored
Normal file
9
test/fixtures/syntax/jsx/tags-with-children/expected.js
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
"use strict";
|
||||
|
||||
X({
|
||||
prop: "2"
|
||||
}, Y(null));
|
||||
|
||||
X({
|
||||
prop: "2"
|
||||
}, [Y(null), Z(null)]);
|
||||
13
test/fixtures/syntax/jsx/tags-with-literals/actual.js
vendored
Normal file
13
test/fixtures/syntax/jsx/tags-with-literals/actual.js
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
(<X> </X>);
|
||||
|
||||
(<X>
|
||||
</X>);
|
||||
|
||||
(<X>
|
||||
string
|
||||
</X>);
|
||||
|
||||
(<X>
|
||||
string
|
||||
string
|
||||
</X>);
|
||||
5
test/fixtures/syntax/jsx/tags-with-literals/expected.js
vendored
Normal file
5
test/fixtures/syntax/jsx/tags-with-literals/expected.js
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
"use strict";
|
||||
X(null, " ");
|
||||
X(null, "\n");
|
||||
X(null, "\n string\n");
|
||||
X(null, "\n string\n string\n ");
|
||||
6
test/fixtures/syntax/react/display-name-assignment-expression/actual.js
vendored
Normal file
6
test/fixtures/syntax/react/display-name-assignment-expression/actual.js
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
var Component;
|
||||
Component = React.createClass({
|
||||
render: function() {
|
||||
return null;
|
||||
}
|
||||
});
|
||||
10
test/fixtures/syntax/react/display-name-assignment-expression/expected.js
vendored
Normal file
10
test/fixtures/syntax/react/display-name-assignment-expression/expected.js
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
"use strict";
|
||||
var Component;
|
||||
|
||||
Component = React.createClass({
|
||||
displayName: "Component",
|
||||
|
||||
render: function() {
|
||||
return null;
|
||||
}
|
||||
});
|
||||
6
test/fixtures/syntax/react/display-name-if-missing/actual.js
vendored
Normal file
6
test/fixtures/syntax/react/display-name-if-missing/actual.js
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
var Whateva = React.createClass({
|
||||
displayName: "Whatever",
|
||||
render: function() {
|
||||
return null;
|
||||
}
|
||||
});
|
||||
9
test/fixtures/syntax/react/display-name-if-missing/expected.js
vendored
Normal file
9
test/fixtures/syntax/react/display-name-if-missing/expected.js
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
"use strict";
|
||||
|
||||
var Whateva = React.createClass({
|
||||
displayName: "Whatever",
|
||||
|
||||
render: function() {
|
||||
return null;
|
||||
}
|
||||
});
|
||||
7
test/fixtures/syntax/react/display-name-object-declaration/actual.js
vendored
Normal file
7
test/fixtures/syntax/react/display-name-object-declaration/actual.js
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
exports = {
|
||||
Component: React.createClass({
|
||||
render: function() {
|
||||
return null;
|
||||
}
|
||||
})
|
||||
};
|
||||
11
test/fixtures/syntax/react/display-name-object-declaration/expected.js
vendored
Normal file
11
test/fixtures/syntax/react/display-name-object-declaration/expected.js
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
"use strict";
|
||||
|
||||
exports = {
|
||||
Component: React.createClass({
|
||||
displayName: "Component",
|
||||
|
||||
render: function() {
|
||||
return null;
|
||||
}
|
||||
})
|
||||
};
|
||||
5
test/fixtures/syntax/react/display-name-property-assignment/actual.js
vendored
Normal file
5
test/fixtures/syntax/react/display-name-property-assignment/actual.js
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
exports.Component = React.createClass({
|
||||
render: function() {
|
||||
return null;
|
||||
}
|
||||
});
|
||||
9
test/fixtures/syntax/react/display-name-property-assignment/expected.js
vendored
Normal file
9
test/fixtures/syntax/react/display-name-property-assignment/expected.js
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
"use strict";
|
||||
|
||||
exports.Component = React.createClass({
|
||||
displayName: "Component",
|
||||
|
||||
render: function() {
|
||||
return null;
|
||||
}
|
||||
});
|
||||
5
test/fixtures/syntax/react/display-name-variable-declaration/actual.js
vendored
Normal file
5
test/fixtures/syntax/react/display-name-variable-declaration/actual.js
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
var Component = React.createClass({
|
||||
render: function() {
|
||||
return null;
|
||||
}
|
||||
});
|
||||
9
test/fixtures/syntax/react/display-name-variable-declaration/expected.js
vendored
Normal file
9
test/fixtures/syntax/react/display-name-variable-declaration/expected.js
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
"use strict";
|
||||
|
||||
var Component = React.createClass({
|
||||
displayName: "Component",
|
||||
|
||||
render: function() {
|
||||
return null;
|
||||
}
|
||||
});
|
||||
Reference in New Issue
Block a user