I know of ways to minify JS and CSS files but is there a way to auto-minify these files in the production system? For instance, I modify something inside the original JS files and update the production environment. However, while using the JS files, it should use an auto-minified version of the JS file (preferably update the current minified version if the source files changed).
Considering that I work in both Unix and Windows environment, writing a bash script did not seem like a plausible idea. So anything that is OS independent or maybe something that uses PHP initially to do this would be great. Any suggestions?