https://www.icyphoenix.com/viewtopic.php?f=17&t=1966&p=14186#p14186
-----------------------------------
casimedicos
Thu 17 May, 2007 16:43

Re: Automatic merging and versioning of CSS/JS files with PH
-----------------------------------
Adding JSMin to my CSS/JS merging script

I've extended my CSS/JS merging script to support piping the merged output through JSMin, assuming you're merging JavaScript of course. The result is a significantly lower file size. As the resulting file is cached to disk the minification process will only be run once rather than on each request.

I've resisted writing a new PHP version of JSMin (there is already a command line version) and have instead used Douglas Crockford's original C version run through shell_exec.

Note: To use shell_exec you'll need to ensure the installation of PHP on your server isn't using safe_mode. Web hosts which don't impose safe_mode restrictions include DreamHost and Media Temple.

http://www.ejeliot.com/blog/73


