This repository was archived by the owner on Jul 19, 2019. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change 7
7
< link rel ="stylesheet " href ="css/base.css " />
8
8
< script src ="https://cdnjs.cloudflare.com/ajax/libs/react/0.14.0/react.js "> </ script >
9
9
< script src ="https://cdnjs.cloudflare.com/ajax/libs/react/0.14.0/react-dom.js "> </ script >
10
- < script src ="https://cdnjs.cloudflare.com/ajax/libs/babel-core/5.6.15/browser .js "> </ script >
10
+ < script src =" https://cdnjs.cloudflare.com/ajax/libs/babel-standalone/6.4.4/babel.min .js "> </ script >
11
11
< script src ="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.1/jquery.min.js "> </ script >
12
12
< script src ="https://cdnjs.cloudflare.com/ajax/libs/marked/0.3.2/marked.min.js "> </ script >
13
13
</ head >
14
14
< body >
15
15
< div id ="content "> </ div >
16
- < script type ="text/babel " src ="scripts/example.js "> </ script >
17
- < script type ="text/babel ">
16
+ < script id ="code " type ="text/babel ">
18
17
// To get started with this tutorial running your own code, simply remove
19
18
// the script tag loading scripts/example.js and start writing code here.
20
19
</ script >
20
+ < script type ="text/javascript ">
21
+ var script = document . createElement ( 'script' ) ;
22
+ script . type = 'text/javascript' ;
23
+ script . text = Babel . transform ( $ ( '#code' ) . text ( ) , { presets : [ 'react' ] } ) . code ;
24
+ $ ( 'body' ) . append ( script ) ;
25
+ </ script >
21
26
</ body >
22
27
</ html >
You can’t perform that action at this time.
0 commit comments