HenrikJoreteg/templatizer — pull request #18 by lukekarrys (2013-09-04 08:31:42+00:00)
Title: Create export for mixins under original file namespace

One thing I often want with templatizer is the ease of calling a function to render an entire page without needing to create include files for each part of the page that I might want to update separately. There are definitely other ways (and at different levels) to solve this issue but I thought a nice way would be to use jade mixins within templatizer.

This PR uses esprima/escodegen to pull the mixins out of the parent function and expose them in the parent's namespace. See the `mixins/` dir for an example template and a test use case. This dir isn't necessary but I thought I'd leave it in for the PR to make it easier to see what this PR does.