We want to develop a browser (client side only) library using Coffeescript, and in particular, we tend to use the \"class\" capability of Coffeescript quite a bit, in addition t
I haven't actually used this technique yet, but:
The only thing to keep in mind here is that CoffeeScript statements are also return values when they are last in a function. So, basically, the following code:
define [], () ->
class Main
translates to:
define([], function() {
var Main;
return Main = (function() {
function Main() {}
return Main;
})();
});
and that should work as expected (I see no reason why it wouldn't based on the compiled JavaScript).
For managing code base, I believe the CS plugin should come in handy. It's maintained by James Burke himself, and supports building of CoffeeScript projects the same way JavaScript projects are built.