Support minification and source-map generation

So far this is just done for `toDisc`.