CoffeeScript 1.11.0 now supports ES6 modules


#1

Jeremy Ashkenas just announced that new version of CoffeeScript now supports ES6 import / export syntax. Also CS 2.0 is starting to cook.

Any words from MDG? Is it trivially to add support of CS 1.11.0 to Meteor?

UPD

Thanks to @GeoffreyBooth work is already in progress.


CoffeeScript and React incompatibilities? Classes?
#2

Should be easy if someone submits a PR and adds a test or two for module support!


#3

It should . . :wink: https://github.com/meteor/meteor/pull/7818


#4

Looks awesome! Let’s get it in there!


#5

This is so cool, will definitely use this once it’s merged.


#6

Merged! @sashko, any idea when this might get released?


#7

Not sure - actually now that we have the ability to ship packages outside of the release cycle, I wonder if we could ship immediately!


#8

A simple version bump would make this possible right?

https://github.com/meteor/meteor/blob/devel/packages/coffeescript/package.js#L3


#9

Sure, I’m just referring to the fact that before Meteor 1.4.1 it was physically impossible to publish a “core” package without doing an entire new release of all of Meteor.


#10

Yeah, that’s a lot better!

So this should do the trick then :slight_smile:

Edit: merged!


#11

FYI, for anyone else coming across this, you can use CoffeeScript 1.11.1 in Meteor today. It’s as simple as:

meteor add coffeescript@1.11.1_1

See https://atmospherejs.com/meteor/coffeescript. Note that the version number of the Meteor package is not (necessarily) the same as the version number of CoffeeScript.

You can prove that it works by creating a coffee file in your project like this:

import { Meteor } from 'meteor/meteor'
console.log Meteor

You should see the Meteor object in the console.


#12

the docs right now are reflecting this new development!