sstephenson / eco

Embedded CoffeeScript templates
MIT License
1.71k stars 68 forks source link

Property `compiler` to easily use eco with express #19

Closed mapmarkus closed 13 years ago

mapmarkus commented 13 years ago

I've added a property to eco so you can declare it as a express compiler like this:

express = require 'express'
eco = require 'eco'

app = express.createServer()

app.configure ->
  app.register '.eco', eco.compiler

Should solve issue #12

aseemk commented 13 years ago

(Just commenting so I can get notified of updates. Thanks!)

sstephenson commented 13 years ago

Thanks for the patch -- I decided to change the Eco API instead in 5d62cdd9db455ea6ac3e4a0634779f8161ea5def, so that eco.compile is compatible with what Express expects.