-->

How to enable harmony in Coffeescript?

2019-04-28 19:00发布

问题:

Here is how I run my js code:

node --harmony ./data/app.js

Now I want to move to the CoffeeScript. So I try to run it like that:

coffee ./data/app.coffee

And it fails. How can I pass this --harmony option?

回答1:

To pass args through, you can use the --nodejs argument:

coffee --nodejs --harmony ./data/app.coffee