Anonymous helpers and events for Jade with Coffeescript support


I created an integration between Jade and Coffeescript that makes it easy to develop programs without helpers/events.
Here’s an example:

      h1 Todo List (#{Tasks.find({checked: $ne: true}).count()})
      label.hide-completed(mt-change="Session.set 'hideCompleted',")
        input(type="checkbox" checked="#{Session.get 'hideCompleted'}")
        | Hide Completed Tasks #{testhelper}

You can see the details here:, or just typing

meteor add xiphy:jade-coffee


Bloody hell, count me in! <3


I finally have time to play with it. Unfortunately I fail to make it work.

Let’s say I use your package as follows:


I get the following error:

   error: No plugin known to handle file 'showWebsite/'. If you want this file to be a
   static asset, use addAssets instead of addFiles; eg, api.addAssets('showWebsite/',

It seems I’ve got no package to handle Jade (even if yours is a fork of one). So I add some:


I don’t see the previous error anymore. But the following line:

p #{Websites.find({}).count()}

which is based on your example:

h1 Todo List (#{Tasks.find({checked: $ne: true}).count()})

still gives a following error:

   showWebsite/ Jade syntax error: Expected IDENTIFIER

What do I miss? What do I do wrong?


Thanks for the testing!
I added some dependencies so that now I have a good build for Linux as well, I hope.
xiphy:jade-coffee@0.1.4 is the new package, which depends on xiphy:jade-compiler@0.5.1, but it’s incompatible with dalgard:jade and mquandalle:jade (I should probably mark this incompatibility somehow, but I’m new to Meteor packages).
Could you please try it?


Thanks! Yeah I will in few hours, as it’s an important evening here in Poland because of parliament elections.

Too bad it’s a fork of mquandelle:jade instead of dalgard:jade as the latter has few very good advantages over mquandelle’s version, especially the features that were introduced to Blaze with Meteor 1.2.

Yes, my testing environment is Meteor 1.2 on Linux.


The problem is that dalgard added other features as well, like bindings that make it harder to integrate generic coffeescript/javascript, as there are more conflicts between the syntaxes. Still, if there’s enough interest, I may port nice features in the future (and accept pull requests).

What is interesting is that this is a completely different direction from what dalgard is doing, I got rid of helpers and prefer global functions (that is similar to the early Meteor days).

I created some general form processing functions today:

@processForm = (event)->
  _.each, (target)->
  return r

@clearForm = (event)->
  _.each, (target)->
  return r

With the helper code I am able to simplify form creation to this
  mt-submit="Tasks.insert clearForm(event)")
  input(type="text" name="text"
   placeholder="Type to add new tasks!")