I have a deploy script that git pulls code from a repo. I'd like to minify the javascript (js) and css files in that deploy script using yuicompressor.
In order to minify one js file you'd use something like this:
java -jar yuicompressor-2.4.2.jar test.js -o test.js
How can I do that to all js and css files recursively (inside subdirectories and across all files while excluding files that aren't js or css)?
Thanks!!
You can use
find + exec
Run it on the root directory of where are your
.css
and.js
are.