monken/p5-plack-middleware-assets — pull request #2 by rwstauner (2011-11-30 03:14:49+00:00)
Title: Allow custom types

First I added some tests to increase coverage (these are actually in a separate branch if you desire them),
then I made the following changes:

- Allow arbitrary types.
- Allow specifying which minifier to use.
- By default do not minify in development.
The documentation stated this previously, but it wasn't actually done.
- More tests.

This paves the way for additional types to be supported directly if desired.
In the future a `filter` option (coderef) might be a good way to support custom transformations.

I was trying to concatenate `*.less` files which get processed on the client side by `less.js`.
It wasn't working for me so I started fiddling with this to alter the `content-type` and disable the comments.

Unfortunately those changes didn't fix anything and I eventually found that `less.js` was choking on a BOM that was coming after the comment. After removing the BOM I found that the less css files could actually be minified by *either* minifier and the content-type didn't seem to matter,
but I still thought these changes were worth including. :-/

What do you think?