bigeasy / stencil

Asynchronous HTML5 templates for Node.js and the browser.
MIT License
9 stars 2 forks source link

Create router generator. #39

Closed bigeasy closed 11 years ago

bigeasy commented 12 years ago

Rather than creating a router, read a directory and create a map of paths to stencils. It's up to the application developer, at this stage, to specify routes using their router.

Not even sure if it should be based on the layout of Stencils, but that would be easiest. Maybe if the file name ends in a special character like @ it will get the path as well.

bigeasy commented 11 years ago

Ended up using the underbar. A leading underbar will prevent the template from being included in the routes, while a trailing underbar indicates path info.