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?

Daniel Widdis
  • 8,424
  • 13
  • 41
  • 63
ciembor
  • 7,189
  • 13
  • 59
  • 100

1 Answers1

15

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

coffee --nodejs --harmony ./data/app.coffee 
loganfsmyth
  • 156,129
  • 30
  • 331
  • 251
  • It doesn't work, it still prints me an error: `Error: AppJS requires Node is run with the --harmony command line flag ` – ciembor Nov 25 '12 at 04:22
  • 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... – ciembor Nov 25 '12 at 04:24
  • @ciembor Looks like I got the order of the arguments wrong, updated. – loganfsmyth Nov 25 '12 at 04:30