How to enable harmony in Coffeescript?
Asked Answered
F

1

6

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?

Floyfloyd answered 25/11, 2012 at 4:13 Comment(0)
E
15

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

coffee --nodejs --harmony ./data/app.coffee 
Exterminate answered 25/11, 2012 at 4:20 Comment(3)
It doesn't work, it still prints me an error: Error: AppJS requires Node is run with the --harmony command line flag Floyfloyd
It's still about lack of --harmony. So I think this option doesn't go to the node, but to the coffee, which doesn't recognize it...Floyfloyd
@Floyfloyd Looks like I got the order of the arguments wrong, updated.Exterminate

© 2022 - 2024 — McMap. All rights reserved.