3 ms·
This article is missing one important thing: CoffeeScript now supports native import and export statements, but decaffeinate doesn't. I recently migrated severa
by luketheobscure 9y ago
This article is missing one important thing: CoffeeScript now supports native import and export statements, but decaffeinate doesn't. I recently migrated several large codebases and had to escape all the import and export statements (which wasn't very hard), but it got a little hairy where we were directly exporting instead of assigning it to a variable first.
I'm going to miss CoffeeScript, but being able to use ES7 features (notably async/await) is worth it.
- sudowork 9y agoWhen we performed our conversion, decaffeinate@2 did support ES2015 import/export - it was actually the default which could be disabled using (`--keep-commonjs`). With decaffeinate@3, you can convert using ES2015 module syntax with the `--use-js-modules` flag. Although we don't plan on using CoffeeScript for the reasons outlined in the article, I do want to mention CoffeeScript 2 does aim to target ES.next features and offer interoperability. Specifically, CoffeeScript 2 does support async/await http://coffeescript.org/v2/#async-functions http://coffeescript.org/v2/#async-functions.
- syntheticcdo 9y agoCoffeeScript 2.0beta has async/await and it works great.