visionmedia/express — pull request #1337 by nyteshade (2012-09-18 08:34:37+00:00)
Title: Trim static dirs, add support for handlebars, jquery (server and client) and forever

This is a culmination of fixes for things I always find myself fixing after every invocation of express. One major peeve I have is the long static directory names (I can make this an option as well). It changes stylesheets to css, javascripts to js, and images to imgs.

Adding -F will add forever as a requirement
Adding -q will add jQuery (for the server) as a requirement
Adding -Q will download the latest version of jQuery for the client into public/js
Adding -b will configure the engine to use handlebars

Client side jQuery will only appear if fibers has been installed globally and curl exists on the OS in question. If either of these conditions are not met, the option is silently unavailable.

Handlebars has several advantages over hjs. The most obvious being working partials support and layout support. But handlebars also has several other advantages and is 100% compatible with hjs.

This fix also corrects the css, less and stylus definitions to be more useful. The example views all have a span.title element containing that is styled instead of generating a style for anchors (i.e. a tags) that are never supplied in any of the examples.

Finally, to make editors more friendly for generated projects, wherever possible view templates use the .html extension and the engines are configured to use that extension instead of the engine desgination (i.e. .ejs, .jade, .hbs, etc...). The only one that is misbehaving is jshtml. It seems broken even in the unaltered download.