visionmedia/consolidate.js — pull request #14 by johncch (2012-03-09 05:50:57+00:00)
Title: Swig does not support initialization

I might be doing this wrong, but I needed template inheritance in Swig and I didn't see a way to do it in consolidate via express 3.x

The way I solved this is to provide an init function to cons.swig so that I can pass in the root param. I don't think this is necessarily the best way to do this, but it seems to solve my problem for now. I bet you want to abstract this out to a pattern that all engines can use, but I'm not sure what's the best way to do it.

For now, this is my suggestion.