Last Updated: February 25, 2016
·
912
· twilson63

Zeke - CoffeeKup extended!

CoffeeKup lets you create your markup using CoffeeScript, but it is hard to extend to add your own or existing modules to the core.

Zeke uses Broadway to make CoffeeKup extendable, so you can create your own modules or add existing modules to CoffeeKup for use in your markup.

https://github.com/twilson63/zeke

https://github.com/twilson63/zeke-markdown

#plugin
plugin = 
  attach: (options) ->
    @helpers['css'] = (content) ->
      text "<style type='text/css'>#{content}</style>"

zeke = require 'zeke'
zeke.use plugin
zeke.init()

# markup
x = zeke.render -> 
  doctype 5
  html ->
    head ->
      css '''
        body: { color: green; }
      '''
    body ->
      h1 'FooBar'

console.log x