Last modified: 2012-07-09 21:32:26 UTC
While I understand there are as many people hating coffeescript as loving it, I think it could be a nice idea to allow linking directly to coffeescript files, which are processed into javascript on save See http://coffeescript.org/ for more information. Example: instead of typing $(function(){ $(".foo").click(function(e){ this.html("hello"); }); }); you type: $ -> $(".foo").click (e) -> @html "hello"
Can you be more elaborate in what you're requesting? How is this a request for MediaWiki core javascript? How do you see this working? Perhaps this could be an idea for an Extension that extends Gadgets, but I'm not sure how this fits in core. Unless it would be a feature in to ResourceLoader. cc-ing Roan.
I suppose you could have a filter in ResourceLoader that loads coffeescript modules by transforming them to JavaScript (shell out to converter or something?) Not sure how best to implement such a thing.
It would have to perform *very* well to be acceptable in ResourceLoader because of the high standards in performance and on-demand package generation. If that level cannot be reached, this should likely become part of your build process and instead refer to the build dir from the module definition. This would at least work on the short term (as in, right now).