Does anything special have to be done to get Electron to run my main.coffee
file? I have a main.js
file (that works) that I converted to CoffeeScript (hence main.coffee
), but when I run Electron main.coffee
I get an error like the following:
App threw an error when running [SyntaxError: /Users/foo/develop/electron/main.coffee:13
app.on('window-all-closed', ->
^
Unexpected token >]
I can only assume this is a CoffeeScript issue, since when I commented the offending code with CoffeeScript's block comment (###
), I got the following:
App threw an error when running [SyntaxError: /Users/foo/develop/electron/main.coffee:13
###
^
Unexpected token ILLEGAL]
I added coffee-script
to my packages.json as a dependency, and made sure it was installed to my local node_modules directory like my other application dependencies, but that didn't seem to help.