Skip to content

Instantly share code, notes, and snippets.

@cha0s
Created June 22, 2012 22:43
Show Gist options
  • Save cha0s/2975596 to your computer and use it in GitHub Desktop.
Save cha0s/2975596 to your computer and use it in GitHub Desktop.
mmm, coffee
app.register(
'.html'
compile: (source, options) ->
if typeof source isnt 'string' then source else
(options) ->
mustache.to_html(
source
options.locals || {}
options.partials || {}
)
render: (template, options) -> @compile(template, options)(options)
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment