I found that using Node on OSX I need the @Hector answer option.
I created a new CoffeeScriptRun.sublime-build
file (Tools> Build System> New Build System), which looked like this:
{ "cmd": ["coffee", "$file"], "selector" : "source.coffee", "path" : "/Users/derekhill/.nvm/v0.10.35/bin" }
This path is the directory from which node
(i.e. without the "node" at the end)
The Wes Bos blog post then provided a useful explanation of what each piece means:
cmd
is an array of commands to be run.selector
is an optional way to combine a script assembly into a specific file typepath
- the command in which the command should be executed. Since Sublime runs it in the python console, we need to indicate where on our system the compiler we want to use is false.
So basically this is equivalent to going to the Node directory and coffee my_file.coffee
works
source share