Skip to content

Commit

Permalink
Cherry-pick squashed version of #4131 - switch website to use babel
Browse files Browse the repository at this point in the history
  • Loading branch information
vipulnsward authored and zpao committed Sep 26, 2015
1 parent d5680ca commit 2f76d00
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 15,922 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
3 changes: 2 additions & 1 deletion docs/Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ require('yaml')

desc "generate js from jsx"
task :js do
system "../bin/jsx --harmony _js js"
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

desc "watch js"
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 @@ -28,10 +28,10 @@
<script type="text/javascript" src="/react/js/es5-shim.min.js"></script>
<script type="text/javascript" src="/react/js/es5-sham.min.js"></script>
<![endif]-->
<script type="text/javascript" src="/react/js/babel-browser.min.js"></script>
<script type="text/javascript" src="/react/js/codemirror.js"></script>
<script type="text/javascript" src="/react/js/javascript.js"></script>
<script type="text/javascript" src="/react/js/react.js"></script>
<script type="text/javascript" src="/react/js/JSXTransformer.js"></script>
<script type="text/javascript" src="/react/js/live_editor.js"></script>
</head>
<body>
Expand Down
Loading

0 comments on commit 2f76d00

Please sign in to comment.