es6-transpiler
es6-transpiler copied to clipboard
Tomorrow's JavaScript syntax today
Caused by an off-by-1 error in `spread.replaceSpreads` Closes #52
Test case: ``` javascript var p = []; var [a,b] = Object(...p); ``` Partial output: ``` javascript // .... Snip.... var p = []; var a = (b = Object.apply(null,...
``` bash #1 es6-transpiler ./myFile.es6 --options '{disallowUnknownReferences: false}' > ./myFile.js #2 es6-transpiler ./myFile.es6 --options ./options.js > ./myFile.js ```
**es6-transpiler.cmd** ``` bash @IF EXIST "%~dp0\/bin/sh.exe" ( "%~dp0\/bin/sh.exe" "%~dp0\node_modules\es6-transpiler\build\es5\es6toes5" %* ) ELSE ( /bin/sh "%~dp0\node_modules\es6-transpiler\build\es5\es6toes5" %* ) ``` After fix ``` bash @IF EXIST "%~dp0\node.exe" ( "%~dp0\node.exe" --harmony "%~dp0\..\es6-transpiler\build\es5\es6toes5.js" %*...
``` js #!/bin/bash function foo() { } ``` Error: ``` Error: Line 1: Unexpected token ILLEGAL ```
http://www.2ality.com/2014/04/call-stack-size.html _ECMAScript 6 will have tail call optimization: If a function call is the last action in a function, it is handled via a “jump”, not via a “subroutine call”....
This bit of code works perfectly fine with Traceur. ``` var $$ = (selector, context=document) => [...context.querySelectorAll(selector)]; ``` With the es6-transpiler the output is: ``` var $$ = function(selector) {function...
When I try to run compiled JS in Rhino, I get error: ``` InternalError: Changing attributes not supported for Function prototype property ``` It was generated because of: ``` js...
https://github.com/square/es6-module-transpiler
Hey @termi, Regenerate v0.6.0 was just released. The new version should take care of the performance issues for you, so you won’t need any workarounds anymore.