什么是好的跨平台css压缩器?

时间:2022-06-16 03:05:13

i need to compress my css as part of my ant build. i noticed that csstidy does this, but it would not be easy to include this in my ant build because i would need to use a different binary on different platforms.

我需要压缩我的CSS作为我的蚂蚁构建的一部分。我注意到csstidy这样做,但是在我的ant构建中包含它并不容易,因为我需要在不同的平台上使用不同的二进制文件。

so, is there a java css compressor that people use?

那么,人们使用的是java css压缩器吗?

2 个解决方案

#1


8  

Check out the Yahoo YUI compressor.

查看Yahoo YUI压缩器。

It compresses CSS as well as Javascript, and it's written in Java.

它压缩CSS和Javascript,它是用Java编写的。

Edit: You should be using some sort of HTTP compression as well, like mod_deflate or mod_gzip.

编辑:您应该使用某种HTTP压缩,如mod_deflate或mod_gzip。

#2


3  

I recently released CSS Compressor. It's a code fork of YUI Compressor, but adds more compression enhancements that make it more similar to csstidy, particularly with regards to grouping selectors that share the same rules. Obviously it's Java, and can be called via the command-line or used as a library within your own Java app.

我最近发布了CSS Compressor。它是YUI Compressor的代码分支,但增加了更多的压缩增强功能,使其更类似于csstidy,特别是对于共享相同规则的分组选择器。显然它是Java,可以通过命令行调用,也可以在自己的Java应用程序中用作库。

#1


8  

Check out the Yahoo YUI compressor.

查看Yahoo YUI压缩器。

It compresses CSS as well as Javascript, and it's written in Java.

它压缩CSS和Javascript,它是用Java编写的。

Edit: You should be using some sort of HTTP compression as well, like mod_deflate or mod_gzip.

编辑:您应该使用某种HTTP压缩,如mod_deflate或mod_gzip。

#2


3  

I recently released CSS Compressor. It's a code fork of YUI Compressor, but adds more compression enhancements that make it more similar to csstidy, particularly with regards to grouping selectors that share the same rules. Obviously it's Java, and can be called via the command-line or used as a library within your own Java app.

我最近发布了CSS Compressor。它是YUI Compressor的代码分支,但增加了更多的压缩增强功能,使其更类似于csstidy,特别是对于共享相同规则的分组选择器。显然它是Java,可以通过命令行调用,也可以在自己的Java应用程序中用作库。