This is probably a quick question. I'd like to run the YUI pressor so that, instead of overwriting all of the javascript files in the input directory, it dumps the output files into a subdirectory called min. I would like to do something like
java -jar yuipressor-2.4.7.jar -o *.js .\min\*.js c:\MyJavascriptDirectory\*.*
but instead it just overwrites the existing files with the minified files. Does anyone know the correct syntax to acplish this?
Thanks!
This is probably a quick question. I'd like to run the YUI pressor so that, instead of overwriting all of the javascript files in the input directory, it dumps the output files into a subdirectory called min. I would like to do something like
java -jar yuipressor-2.4.7.jar -o *.js .\min\*.js c:\MyJavascriptDirectory\*.*
but instead it just overwrites the existing files with the minified files. Does anyone know the correct syntax to acplish this?
Thanks!
Share Improve this question asked Mar 24, 2012 at 15:16 AndrewAndrew 6,54411 gold badges39 silver badges56 bronze badges2 Answers
Reset to default 3I'm not sure of the correct syntax to do that, but someone has made a modification so that you can set up your output directory as follows
java -jar yuipressor.jar --output-dir /some/folder/for/pressed/js *js
This allows you to have a source folder and a pressed folder. As opposed to having source and a bunch of -min.js files in the same folder.
You can download the mod at the bottom of the page here http://yuilibrary./projects/yuipressor/ticket/2528131
java -jar yuipressor.jar -o '.js$:-min.js' *.js
will minify all .js files and save them as -min.js then you could just move all those files: mkdir min; mv *-min.js min/
.
Source