goodeggs/teacup — pull request #1 by asalant (2012-12-01 06:57:22+00:00)
Title: Express support

Adam, I thought it would be fun to add express view rendering support to Teacup so here it is (test included).

https://github.com/goodeggs/teacup/tree/express#express

In order to be able to require teacup from a non-coffee project, I needed compiled JS so I switched the dir structure to have src and lib directories with a pretest compile step (like fibrous). I think this is considered best practice for npm deployment anyway.

It looked like the primary/cleanest way to use teacup was to require the exported tags from a Teacup instance. I switched to having an index file export the tags in addition to the Teacup reference. So you can do

```coffee
{render, div} = require 'teacup'

or

{Teacup} = require 'teacup'
```

Weird or does it seem right?

For the express support, I didn't include that in the index because I had to require coffee-script to get module loading of .coffee files and wouldn't want that to get browserified if you require teacup in a client view.