If you want to output javascript that looks more familiar to what we're used to dealing with in D7 try this:

(($) ->
  Drupal.behaviors.test = attach: (context, settings) ->
    $("test").hide()
    return

  return
) jQuery

becomes (use the bare option, -b)

// Generated by CoffeeScript 1.6.3
(function($) {
  Drupal.behaviors.test = {
    attach: function(context, settings) {
      $("test").hide();
    }
  };
})(jQuery);

It's not perfect since we still need the bare option, but it outputs what I'm used to seeing, and probably what most everyone else is too.

Comments

mike.roberts’s picture

Category: Support request » Feature request

Also I wasn't sure what to mark this as. I guess support request doesn't really work though, so changing to feature request to possibly add the bare option to the PHP compiling step and to update the documentation.

mike.roberts’s picture

StatusFileSize
new1.99 KB

Here's a patch to get the ideas flowing, not sure how well it'll actually work.