Using traceur compiler with meteor

I would like to use Javascript generators on client code (and other ES6 features), but AFAIK it's not yet implemented in all major browsers yet or enabled by default. So I found traceur.

But I'm having trouble with Meteor integration. Traceur provides a command line compiler, which I could call as meteor-typescript (even if it's not recommended), because I couldn't find documentation about compiling a string from Javascript with traceur.

Then, I guess a runtime dependency is also required and has to be served to the client. Can I use bower for that?

Thanks in advance for any suggestions or pointers.

Edit: I could call the compiler (see my meteor-traceur), but I don't know how to add the runtime dependency. Traceur defines a RUNTIME_PATH, but I can't use it with api.add_files because the npm module isn't imported inside package.js (where Packages.on_use should be defined).


The npm depencies are installed in the .npm directoy in the package. You can add the traceur runtime by adding this to package.js:

Package.on_use(function (api) {

I forked your repository and fixed this:

I also created a demo app:

Need Your Help