Reputation: 10953
I am following the suggested answer on this SO post:
How to automate JavaScript files compression with YUI Compressor?
However, in my ~/Scripts folder, I have several jQuery files that are already compressed and minified. What do I need to do to automate it in a similar fashion but skip the jQuery files?
Upvotes: 1
Views: 703
Reputation: 336
maybe something like this:
cd ~/Scripts
find . -name "*jquery*" -prune -o -type d -o -exec java -jar yuicompressor.jar -o '.js$:-min.js' {} +
Upvotes: 0
Reputation: 42496
You could name all of your uncompressed files whatever.max.js
, and then change the rule to something like this:
for %%a in (*.max.js) do @java -jar yuicompressor.jar "%%a" -o "deploy\%%a"
Upvotes: 1