I would like to define some global template I use across my app. What the best way to do that ?
commons =
media: (attrs) ->
div class: 'media', ->
a href: attrs.link, class: 'img icon', ->
img attrs.img
div class: 'bd', -> attrs.body
compile = CoffeeKup.compile
CoffeeKup.compile = (template, options = {}) ->
options.hardcode ?= {}
_.extend options.hardcode, commons
compile template, options
window.test = ->
tpl = CoffeeKup.compile ->
h1 "test"
media
link: '#path'
img: src: '/img/path'
body:
p text: 'this is a paragraph'
tpl()