coffee-to-es2015-codemod
coffee-to-es2015-codemod copied to clipboard
How did this go for you?
Hey - this library looks very cool - I am looking at doing something similar, trying to convert maybe 5-10k lines of coffeescript to es2015. I see the last commit here is a few months old - I am just wondering how your transition went using these transforms. Have you completed it? Would you consider it a success? How much time do you think you saved vs converting by hand? thanks!
Hey!
Thanks :-) We still haven't converted our codebase, although we just had our first PR succeed on Jenkins in which all files were converted, so I guess it won't be long now.
The problem with these transforms is that they make a lot of assumptions on code style, so I can imagine that some of these won't work as well for your codebase. If you could give me a idea of what type of codebase you're working with, I could maybe explain which transforms will work and which won't (e.g. backbone-classes assumes that all classes are extending objects that have a .extend
method).
If you're working on a CJSX codebase I have some changes locally to recast that might be interesting too.
All in all I'm confident that this approach will actually save us a lot of time/hassle, but like I said, we're not done yet!
Hey there,
It's now been two weeks since we converted our codebase to ES2015! I'm really happy with the performance of the transforms, but there was still quite some "manual" labor left. After the transform we had 30k ESLint warnings in our codebase, with the help of some ESLint/JSCS autofixers and some stylistic codemods we reduced it to <5k, the rest is being manually fixed as we see them at the moment.
All in all I'm really happy with the outcome, but I can't stress it enough that this will probably never work as a "single-click" coffee-to-es2015 transform, there will always be manual labour left over.
If you have any questions, please let me know and I'd be happy to answer!