Coffee-HTML: generate HTML in CoffeeScript
Usage
You can install Coffee-HTML with NPM:
npm install coffee-html
Its syntax looks like:
require 'coffee-html' data = rose: 'flower' lilyturf: 'plant' page = html -> @div class: 'demo' @div id: 'demo' for nametype of data @div class: 'content' @text ": " if dataothers? @div class: 'more'@text dataothers page # => generated HTML here
This package only supports tags that defined in the source code. Customized tags are not supported.
Changelog
-
0.4.1
- Refactor code from my early years
- Remove
__proto__
-
0.4.0
- Previously named Liliturf, renamed to Coffee-HTML
Early ideas:
A Gist: https://gist.github.com/2498711
License
MIT