Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Migrating from CoffeeScript to es6

I'd like to migrate a largish program from CoffeeScript to es6. By largish I mean 3K lines of Coffee (1.9K w/o comments) -> 4.5K es5 w/o comments. Coffee is quite terse!

I realize I can just compile to es5 and upgrade by hand to es6 features. But CS is more like es6 than es5 so would prefer migrating from CS, not es5. I'll use Traceur or 6to5 for es6 features not available yet.

Any pointers? I've seen one discussion on AirPair but it was quite incomplete.

like image 523
backspaces Avatar asked Dec 24 '14 19:12

backspaces


1 Answers

There is a work in progress library to automate the process: https://github.com/eventualbuddha/decaffeinate

This is still incomplete but maybe it could be a good starting point.

like image 59
idFlood Avatar answered Oct 31 '22 08:10

idFlood