pilif/sacy — pull request #12 by brainlock (2012-05-18 13:32:57+00:00)
Title: Add basic support for Eco templates

This adds support for the `text/x-eco` mimetype, which will be processed using eco (https://github.com/sstephenson/eco).

It supports specifying an attribute in the script tag named `data-eco-root` which tweaks the namespace to which the compiled template functions will be assigned.

Known limitations
--------------------------

One minor thing still on which I'd still like to improve at a later point is how the name of the template function is determined. Right now this is left to the eco compiler, which just uses the file's basename. This would cause problems in case we have two templates like `templates/user/detail.eco` and `templates/airplane/detail.eco`. Ideally I'd have a way to specify that one is `user/detail` and the other `airplane/detail`. But this can come at a later stage.