I\'d like to write Javascript scripts for Google Apps Script using CoffeeScript, and I\'m having trouble generating functions in the expected form.
Google Apps Scrip
This should give you a global named function (yes, it's a little hacky, but far less that using backticks):
# wrap in a self invoking function to capture global context
do ->
# use a class to create named function
class @triggerableFunction
# the constructor is invoked at instantiation, this should be the function body
constructor: (arg1, arg2) ->
# whatever