Skip to content
No description or website provided.
Pull request Compare This branch is even with maccman:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
bin
dist
lib
src
test
.gitignore
Cakefile
LICENSE
README.md
Rakefile
package.json

README.md

CFT: CoffeeScript fragment templates

CFT lets you embed CoffeeScript in your markup. It's a lot like Eco, except it generates Document Fragments instead of strings.

Using document fragments for templates lets you do some interesting things, such as dynamic DOM updation. For example:

<% @observe @post => %>
  <!-- Run whenever post changes -->

  <span><%= @post.get('name') %></span>
<% end %>


<% @observeEach User.all() (user) => %>
  <!-- Run whenever we create/update/change a user -->
  <label>Name: <%= user.name %>
<% end %>
Something went wrong with that request. Please try again.