code to export a browser module by commonjs, amd or global-var
root = @
MYMODULE =
foo: 42
fizzy: ->
return "bubbele"
# Export the module
if typeof module isnt 'undefined' and module.exports
exports = module.exports = MYMODULE
else if typeof exports isnt 'undefined'
exports.MYMODULE = MYMODULE
else if typeof define is 'function' and typeof define.amd is 'object' and define.amd
define ->
return MYMODULE
return
else
root.MYMODULE = MYMODULE