I would like to know if First Spirit has some standard tool to compress js and css files. In case this tool does not exist, somebody made it with some kind of Java script on generation? Compressing all media files with css and js extension and then adding the reference into the top of a template or something like that maybe...
as far as I know there is no standard solution. This topic was discussed in several other posts as well. (E.g.:https://community.e-spirit.com/message/25742#25742)
We are currently developing a FirstSpirit Module for our own website which will minify CSS and JS files. We also plan to put this module into the marketplace in the first quarter of 2016.
If you are interested in details just write me a private message.
Sandro is right. If you could not wait for the module of Sandro then you have to do some own Java development. You could write a executable class (which resides in a own FSM you have to install) which is called inside a deployment task. This task would run after the generation. In the executable you can use whatever minification you like (regex to kill whitespaces).
But if I were you and could afford to buy that module I would go for that. There is probbably more to consider than just the few points I drawed above.