Please, consider the following code. If I declare the exports field as follows:
exports =
someFunc : -> # blablabla
someOtherFunc : ->
It gets compiled into:
var exports;
exports = {
someFunc: function() {},
someOtherFunc: function() {}
};
But as you probably already know I need the exports field to remain undeclared. In other words I need to somehow inform the compiler not to produce the var exports; statement.
I know that I can hack around this like that:
exports.someFunc = ->
exports.someOtherFunc = ->
but that's just messy and very much seems like a defect, since the essence of CoffeeScript is to reduce the code noise.
Is there a way or a better hack around this?