I'm working on a tool that converts LiveScript AST to ES AST, current version supports output of babel AST. You can try it here.
With this, LiveScript can be compiled to any version of ES (that babel supports).
Why?
See gkz/LiveScript#821.
We have good tools can generate ES code from a tree, if we use them wisely, it would be an easy way to keep up with latest ES features.
Status
LiveScript features other than for, while, yield, function*, class are implemented or partially implemented, all of that required to host itself are done, and the first version is published to npm.
It can be used with babel as a custom parser, and when using in this way, first class code coverage support is enabled. The coverage tool can instrument directly with original source locations, instead of translate compiled locations back with source maps (see also: coverage report of itself).
import can be used like require! at top scope, and export is converted to ES equivalent instead.
import { createStore } from "redux";
import react from "react";
import * as $ from "react-dom";
export { myApp as default, another as alias };
export { myFn };
export { externalFn, externalName as renamed } from "external";
Destructuring is also converted to its ES equivalent, this also enables splats in object:
I'm working on a tool that converts LiveScript AST to ES AST, current version supports output of babel AST. You can try it here.
With this, LiveScript can be compiled to any version of ES (that babel supports).
Why?
See gkz/LiveScript#821.
We have good tools can generate ES code from a tree, if we use them wisely, it would be an easy way to keep up with latest ES features.
Status
LiveScript features other than
for
,while
,yield
,function*
,class
are implemented or partially implemented, all of that required to host itself are done, and the first version is published to npm.It can be used with babel as a custom parser, and when using in this way, first class code coverage support is enabled. The coverage tool can instrument directly with original source locations, instead of translate compiled locations back with source maps (see also: coverage report of itself).
import
can be used likerequire!
at top scope, andexport
is converted to ES equivalent instead.Destructuring is also converted to its ES equivalent, this also enables splats in object:
Existence operators are compiled with ES destructuring, to avoid using multiple temporary variables.
do
expressions(just advanced to stage 1!) are used to turn everything into expressions.async
/await
expressions are also possible to add with this, and will be included in next release.