javascript - Command Line Options For YUI Compressor - Stack Overflow

This is probably a quick question.I'd like to run the YUI pressor so that, instead of overwritin

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 badges
Add a ment  | 

2 Answers 2

Reset to default 3

I'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

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1744144963a4560379.html

相关推荐

  • javascript - Command Line Options For YUI Compressor - Stack Overflow

    This is probably a quick question.I'd like to run the YUI pressor so that, instead of overwritin

    8天前
    10

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信