我应该使用YUI压缩器还是新的Google Closure编译器来压缩我的JavaScript? [英] Should I use the YUI Compressor or the new Google Closure compiler to compress my JavaScript?

查看:115
本文介绍了我应该使用YUI压缩器还是新的Google Closure编译器来压缩我的JavaScript?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

YUI Compressor是最小化共识的最佳工具,但是Closure似乎会更好.

解决方案

您觉得最适合谁",我认为这是目前的普遍答案-YUI的使用时间已更长,因此毫无疑问将是目前拥有的共识是最好的工具.闭包对我们来说是新手-因此,闭包没有像YUI那样丰富的经验.因此,我认为您不会在现实世界中找到令人信服的论点,即为什么仅仅因为它是新事物而基于人们的经验使用Closure即可.

这并不是说您不应该使用Closure ....只是我的一句话,在许多人使用2并进行比较之前,我认为没有答案./p>

有一些早期比较,说Closure确实可以改善: http://blog.feedly.com/2009/11/06/google-closure-vs-yui-min/
http://news.ycombinator.com/item?id=924426

进一步 值得关注关闭的问题列表: http://code.google.com/p/closure-compiler/issues/list

YUI Compressor was the consensus best tool for minimizing, but Closure seems like it could be better.

解决方案

"Whichever you find best for you" I think is the general answer at the moment - YUI has been available longer so undoubtedly will be the one which currently has the consensus as being the best tool. Whereas Closure is new to us - so there isn't the wealth of experience with Closure as there is with YUI. Hence I don't think you'd find a compelling real-world arguments of why to use Closure based on people's experiences with it simply because it's new.

That's not to say you shouldn't use Closure....just my round about way of saying, I don't think there's an answer available to this until a number of people have used the 2 and compared them.

Edit: There are a couple of early comparisons, saying Closure does give an improvement: http://blog.feedly.com/2009/11/06/google-closure-vs-yui-min/
http://news.ycombinator.com/item?id=924426

Further Edit: Worth keeping an eye on issue list for Closure: http://code.google.com/p/closure-compiler/issues/list

这篇关于我应该使用YUI压缩器还是新的Google Closure编译器来压缩我的JavaScript?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆