TBCompressor 2.4.2
基于YUICompressor, 淘宝的css和js压缩工具。
介绍贴:http://lifesinger.org/blog/?p=464
2.4.2升级说明:
- yuicompressor升级到2.4.2
- 重写了compressor.cmd, 添加了比较详细的注释
- 改变了在注册表的中的注册方式,以避免与css和js的默认编辑器引起冲突
- 右键菜单项中,添加C作为快速选择键
安装请先阅读readme.txt
基于YUICompressor, 淘宝的css和js压缩工具。
介绍贴:http://lifesinger.org/blog/?p=464
2.4.2升级说明:
安装请先阅读readme.txt
有朋友问到淘宝是怎么压缩js和css的,这里分享下。
我们使用的是YUI Compressor:
The YUI Compressor is a JavaScript compressor which, in addition to removing comments and white-spaces, obfuscates local variables using the smallest possible variable name. This obfuscation is safe, even when using constructs such as ‘eval’ or ‘with’ (although the compression is not optimal is those cases) Compared to jsmin, the average savings is around 20%.
The YUI Compressor is also able to safely compress CSS files. The decision on which compressor is being used is made on the file extension (js or css)
淘宝前端的开发环境以Windows居多。为了方便使用,对YUICompressor做了层简单的封装,称之为TBCompressor. 安装和使用方法如下: