There's actually a pretty nifty minifier http://www.ctrl-alt-test.fr/?page_id=7 no source though.

There's also Aras's GLSL optimizer https://github.com/aras-p/glsl-optimizer which could do minification as well. Forked it but haven't gone too far with it.