Add support for React pre v0.12 transform
This uses an option `reactCompat` to emit code that works with React pre v0.12
This commit is contained in:
3
test/fixtures/transformation/react/compat-convert-component/actual.js
vendored
Normal file
3
test/fixtures/transformation/react/compat-convert-component/actual.js
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
var x = <Component foo="bar">
|
||||
<Namespace.Component />
|
||||
</Component>
|
||||
3
test/fixtures/transformation/react/compat-convert-component/expected.js
vendored
Normal file
3
test/fixtures/transformation/react/compat-convert-component/expected.js
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
var x = Component({
|
||||
foo: "bar"
|
||||
}, Namespace.Component(null));
|
||||
3
test/fixtures/transformation/react/compat-convert-component/options.json
vendored
Normal file
3
test/fixtures/transformation/react/compat-convert-component/options.json
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"reactCompat": true
|
||||
}
|
||||
1
test/fixtures/transformation/react/compat-convert-tags/actual.js
vendored
Normal file
1
test/fixtures/transformation/react/compat-convert-tags/actual.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
var x = <div foo="bar"><font-face></font-face></div>;
|
||||
3
test/fixtures/transformation/react/compat-convert-tags/expected.js
vendored
Normal file
3
test/fixtures/transformation/react/compat-convert-tags/expected.js
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
var x = React.DOM.div({
|
||||
foo: "bar"
|
||||
}, React.DOM["font-face"](null));
|
||||
3
test/fixtures/transformation/react/compat-convert-tags/options.json
vendored
Normal file
3
test/fixtures/transformation/react/compat-convert-tags/options.json
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"reactCompat": true
|
||||
}
|
||||
Reference in New Issue
Block a user