<commit_before>node-toffee
=========
an express 2.x, 3.x, and browser templating language based on coffeescript with slicker tokens and automatic space sensing.

status
======
Early beta. Don't use this unless you work at OkCupid.

the basic idea
==============
A region inside a toffee template is in one of two modes: `toffee` or `coffee`.  Inside your coffee-script you
can put whatever coffee-script you like.

todo
======
- state row should have mode and line number isntead of just "TOFFEE" or "COFFEE"
- make this thing work as compiled output JS, not just node
- escape functions
- get string escaping working in case something has triple quotes
- add to unit tests
- command line version, like max's
- get error checking working
	 - template errors
	 - runtime errors
- get cache options as parameters available
- meaningful errors (line numbers!)<commit_msg>Update master<commit_after>TOFFEE
=========
an express 2.x, 3.x, and browser templating language based on coffeescript with slicker tokens and automatic space sensing.

status
======
Early beta. Don't use this unless you work at OkCupid.

examples
========
Printing variables is easy. Just use CoffeeScript's #{} syntax:
```
<p>Hello, #{user.name}</p>
```

Which of course is very powerful, if you want to get crazy:
```
You have #{(x for x in friends when x.g is "f").length} female friends.
```

But the real power comes froms from switching between `coffee` mode and `toffee` mode:
```
{#
   if @projects.length
    for project in @projects {:
      <a href="#{project.url}">#{project.name}</a>
      <p>#{project.description}</p>
    :}
   else {:No projects:}
#}
```

Elegant nesting support is a very important part of Toffee:
```
{#
   for name, info of friends when info.age < 21 {:
      #{name} would make a great designated driver.
      {#
         info.cars.sort (a,b) -> b.speed - a.speed
         if info.cars.length {: You sould probably take the #{info.cars[0]} :}
         else {: But she has no wheels. :}
      #}      
   :}
#}
```


todo
======
- state row should have mode and line number isntead of just "TOFFEE" or "COFFEE"
- make this thing work as compiled output JS, not just node
- escape functions
- get string escaping working in case something has triple quotes
- add to unit tests
- command line version, like max's
- get error checking working
	 - template errors
	 - runtime errors
- get cache options as parameters available
- meaningful errors (line numbers!)
{'fraction_non_alphanumeric': 0.11444805194805195, 'fraction_numerical': 0.002840909090909091, 'mean_word_length': 3.547970479704797, 'pattern_counts': {'":': 0, '<': 10, '<?xml version=': 0, '>': 10, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '550708', 'n_tokens_mistral': 743, 'n_tokens_neox': 698, 'n_words': 323}