a smaller, faster coffeekup
CoffeeScript
Latest commit b7f698b Dec 20, 2012 @aeosynth Merge pull request #8 from mikesmullin/patch-1
mention similar lib
Failed to load latest commit information.
lib Fix autoescape (#4), ignore non-strings (#3) Jul 20, 2012
.gitignore
Cakefile
LICENSE
README.md mention similar lib Dec 20, 2012
benchmark.coffee Added package.json and fixed benchmark Jul 26, 2011
package.json Added package.json and fixed benchmark Jul 27, 2011

README.md

a smaller, faster coffeekup

$ cake bench
ck: 268ms
ck (format): 316ms
coffeekup: 301ms
coffeekup (format): 974ms

subtractions

  • no cache; manage it on your own.
  • must compile templates before rendering them
  • no support for browsers, frameworks
  • no cli tools
  • no scope option (use context instead)

additions

compileFile:

template = ck.compileFile './template.coffee'
html = template context: user: {}
console.log html

correctly handle booleans:

template = -> input autocomplete: off
console.log ck.compile(template)() #<input>
console.log coffeekup.render template #<input autocomplete="false" />

IE conditionals:

ie 'lt IE8', ->
  link href: 'ie.css', rel: 'stylesheet'

other

ck doesn't add slashes to self closing tags. I'm not actually sure what's right, see this for some reading....

recently another attempt was made at minimizing the coffeecup engine called coffee-templates. it was inspired by and uses some of the same techniques as ck, so may be worth a look, as well.