CoffeeScript 1.11.0 now supports ES6 modules

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.

4 Likes

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

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

2 Likes

Looks awesome! Let’s get it in there!

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

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

1 Like

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

A simple version bump would make this possible right?

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

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.

Yeah, that’s a lot better!

So this should do the trick then :slight_smile:

Edit: merged!

4 Likes

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.

5 Likes

the docs right now are reflecting this new development!

1 Like