farmdawgnation/vain — pull request #2 by farmdawgnation (2014-05-28 21:22:44+00:00)
Title: Middleware Only: Prioritize usage as middleware, implement params.

![middleware](http://cdn.memegenerator.net/instances/500x/46844589.jpg)

Good changes here:

* This PR rewires a good chunk of the internals to prioritize middleware processing as The One True Way to run vain. Running as middleware always gives us access to the request scope, and when combined with the vain router, requires very little code in the actual client application to run vain directives as code.
* Snippets get the request they're running against passed in.
* You can now pass parameters into snippets in invocations. This is done by writing a data-vain attribute like: `data-vain="snippet-name?param1=thing¶m2=awesome"`. Snippets can take these parameters and change their behavior accordingly.

Opening this up for review by anyone who would like it (and to give me a bit of time to update the readme and test this).