divshot/superstatic — pull request #84 by nporteschaikin (2014-05-23 18:37:20+00:00)
Title: Single-page app easy routing

Inspired by [this branch on carrot/charge](https://github.com/carrot/charge/tree/spa), this implements an `spa` configuration option which simply manipulates the configuration before the middleware chain is instantiated. This is entirely for convenience.

Setting `spa` to `true` manipulate `clean_urls` and `custom_routes` to install a routing template for single-page applications:
- It forces `clean_urls` to `true`, and.
- It extends `routes` to include the following routes:

```javascript
{
"./!(*.*)": "/index.html",
"**/!(*.*)": "/index.html",
"./*.html": "/index.html",
"**/*.html": "/index.html"
}
```