wearefractal/dermis — pull request #1 by JosephJNK (2012-08-14 01:35:48+00:00)
Title: Added optional before step and setup/teardown

Before steps can be added to routes between the time they are created and when dermis.init is called. These steps will be called when a route is requested, and they can redirect a request by changing the hash, perform side effects, and/or return an error to prevent the hash change from taking effect.

Route can either take an AMD module containing a function, as before, or can take an AMD module containing the keys "setup" and "teardown", each containing a function. Setup will be called when entering a route and teardown will be called when leaving it.

Examples of the new features are contained in the newExample folder in the examples directory.