Build to both minified & normal output, added spec for middleware