2 ms·
I did an experiment about a year ago when I re-wrote part of LiveScript's code emitter to produce a babel-compatible AST rather than javascript code. It would t
by AriaMinaei 9y ago
I did an experiment about a year ago when I re-wrote part of LiveScript's code emitter to produce a babel-compatible AST rather than javascript code. It would then pipe the AST to babel's generator and produce the final JavaScript. The benefit was that I could then use any babel-compatible toolset and still write code in LiveScript. ESLint worked with almost no tweaks necessary. Theoretically, you could also use Flow and TypeScript with this approach.
Anyway, I didn't have enough time to finish the project, but somebody took the idea and did most of the work [0].
[0] https://github.com/dk00/livescript-next https://github.com/dk00/livescript-next
Would love to explain more, but have to board the plain now :) These links might help:
https://github.com/gkz/LiveScript/issues/821 https://github.com/gkz/LiveScript/issues/821
https://github.com/facebook/flow/issues/1515 https://github.com/facebook/flow/issues/1515