Skip to content

Commit

Permalink
[docs] Replace JSXTransformer with babel/browser
Browse files Browse the repository at this point in the history
Closes #4131
  • Loading branch information
vipulnsward authored and zpao committed Sep 26, 2015
1 parent d3d2504 commit 1d4371a
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 15,921 deletions.
3 changes: 3 additions & 0 deletions docs/Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -80,3 +80,6 @@ DEPENDENCIES
rake
rb-fsevent
sanitize (~> 2.0)

BUNDLED WITH
1.10.1
1 change: 1 addition & 0 deletions docs/Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ require('yaml')

desc "generate js from jsx"
task :js do
system "cp ../node_modules/babel/node_modules/babel-core/browser.min.js ./js/babel-browser.min.js"
system "../node_modules/.bin/babel _js --out-dir=js"
end

Expand Down
2 changes: 1 addition & 1 deletion docs/_js/live_editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ var ReactPlayground = React.createClass({
getDefaultProps: function() {
return {
transformer: function(code) {
return JSXTransformer.transform(code).code;
return babel.transform(code).code;
},
editorTabTitle: 'Live JSX Editor',
showCompiledJSTab: true,
Expand Down
2 changes: 1 addition & 1 deletion docs/_layouts/default.html
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
<script src="/react/js/codemirror.js"></script>
<script src="/react/js/javascript.js"></script>
<script src="/react/js/react.js"></script>
<script src="/react/js/JSXTransformer.js"></script>
<script src="/react/js/babel-browser.min.js"></script>
<script src="/react/js/live_editor.js"></script>
</head>
<body>
Expand Down
Loading

0 comments on commit 1d4371a

Please sign in to comment.