No description or website provided.
CoffeeScript JavaScript Ruby
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
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 %>