I'm looking for some applications or websites that minimize css and js files. Ideally, they could batch them all or if not, one at a time.
相关问题
- Is there a limit to how many levels you can nest i
- How to toggle on Order in ReactJS
- void before promise syntax
- Keeping track of variable instances
- Can php detect if javascript is on or not?
YUI Compressor is pretty cool. You can run it as part of a build process from the command line
There's also a .NET port of YUI Compressor which allows you to:-
YUI Compressor does both JavaScript and CSS. I'm not sure if you can send it a batch of files.
You can batch process at YUI Compressor Online (yui.2clics.net), though that version only accepts JavaScript. Another Online YUI Compressor (refresh-sf.com) accepts CSS, too, but doesn't batch.
In terms of comparing the various minifiers, see jQuery : Frequently Asked Questions (FAQ) : How do I compress my code? Also, check out Microsoft Ajax Minifier.
jQuery has switched from the YUI Compressor to Google's Closure Compiler for the minified version that they distribute.
I like this one from Yahoo: http://developer.yahoo.com/yui/compressor/
Take a look at The JavaScript CompressorRater. It does live comparisons of various minifiers (with and without gzip compression) for any JavaScript you supply it.
It also (mostly) works with CSS, though not all minifiers support it and not even all of those that do (e.g. YUI) show up correctly in the comparison table.
I use Packer by Dean Edwards for javascript.