With Meteor 1.3 we now have access to ES2015 modules, a.k.a.
export. Fortunately for CoffeeScript diehards like me, modules can also be used via CommonJS, a.k.a.
module.exports. I’ve written some documentation explaining how to use modules in CoffeeScript.
I’ve also ported the official Todos app into CoffeeScript, to create a working demonstration of how to achieve various ES2015 things in CoffeeScript. You can see how to import and export other files of your own, and how to import Meteor packages and NPM modules. The example also shows how to work with
super in CoffeeScript. The original
.js files are left in the same folders alongside their
.coffee equivalents, so you can compare them side by side.
As far as I can tell you can achieve any Meteor feature in CoffeeScript, even Meteor 1.3 ES2015 features like modules and class support, without needing backticks or mixing
.js files into your project. Yes, I know, you can certainly achieve any Meteor feature in ES2015, but I still find CoffeeScript much easier to read and I’d rather stick with it if at all possible. For now, at least, it’s still possible.