File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11{
2- "presets" : [" es2015" ]
2+ "presets" : [
3+ [
4+ " env" ,
5+ {
6+ "targets" : {
7+ "browsers" : [" last 2 versions" ]
8+ }
9+ }
10+ ]
11+ ]
312}
Original file line number Diff line number Diff line change @@ -87,7 +87,9 @@ <h3>Warnings</h3>
8787< script src ="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.17.0/codemirror.js "> </ script >
8888< script src ="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.17.0/mode/javascript/javascript.js "> </ script >
8989
90- < script src ="https://cdnjs.cloudflare.com/ajax/libs/babel-standalone/6.10.3/babel.js "> </ script >
90+ < script src ='https://unpkg.com/babel-standalone@6/babel.js ' defer > </ script >
91+ < script src ='https://unpkg.com/babel-polyfill@6/dist/polyfill.min.js ' defer > </ script >
92+ < script src ='https://unpkg.com/babel-preset-env-standalone@0.0.6/babel-preset-env.js ' defer > </ script >
9193< script src ="repl-browser.js "> </ script >
9294
9395< script >
@@ -105,7 +107,7 @@ <h3>Warnings</h3>
105107 continueComments : "Enter" ,
106108 readOnly : true
107109 } ;
108-
110+
109111 var input = CodeMirror ( document . getElementById ( 'input' ) , inputOpts ) ;
110112 var output = CodeMirror ( document . getElementById ( 'output' ) , outputOpts ) ;
111113
@@ -141,4 +143,4 @@ <h3>Warnings</h3>
141143 document . getElementById ( 'es5' ) . onchange = function ( ) { change ( input ) }
142144</ script >
143145</ body >
144- </ html >
146+ </ html >
Original file line number Diff line number Diff line change @@ -157,15 +157,16 @@ module.exports = function () {
157157
158158// super-simple in-browser REPL for testing this thing
159159// to build:
160- //
160+ //
161161// npm install -g browserify
162162// browserify repl.js -o repl-browser.js
163163
164164var plugin = require ( '../babel-ng-annotate' ) ;
165165
166166window . transform = function ( code , es2015 ) {
167+
167168 return Babel . transform ( code , {
168- presets : es2015 ? [ 'es2015' ] : [ ] ,
169+ presets : es2015 ? [ window . babelPresetEnv . default ] : [ ] ,
169170 plugins : [ plugin ]
170171 } ) ;
171172} ;
Original file line number Diff line number Diff line change 11// super-simple in-browser REPL for testing this thing
22// to build:
3- //
3+ //
44// npm install -g browserify
55// browserify repl.js -o repl-browser.js
66
77var plugin = require ( '../babel-ng-annotate' ) ;
88
99window . transform = function ( code , es2015 ) {
10+
1011 return Babel . transform ( code , {
11- presets : es2015 ? [ 'es2015' ] : [ ] ,
12+ presets : es2015 ? [ window . babelPresetEnv . default ] : [ ] ,
1213 plugins : [ plugin ]
1314 } ) ;
14- }
15+ }
You can’t perform that action at this time.
0 commit comments