ck

0.0.1 • Public • Published

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....

Readme

Keywords

none

Package Sidebar

Install

npm i ck

Weekly Downloads

1

Version

0.0.1

License

none

Last publish

Collaborators

  • kzh