Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

a smaller, faster coffeekup

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 lib
Octocat-spinner-32 .gitignore
Octocat-spinner-32 Cakefile
Octocat-spinner-32 LICENSE
Octocat-spinner-32 README.md
Octocat-spinner-32 benchmark.coffee
Octocat-spinner-32 package.json
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.

Something went wrong with that request. Please try again.