What do you use to minimize and compress JavaScript libraries?
相关问题
- 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?
I don't minimize JavaScript at all: gzip compression is good enough for me and has the additional benefit that error messages will still be useful.
https://jawr.dev.java.net/ is excellent for minification and versioning
I have tried YUI compressor before, but it gives me error message.
I suggest using JSMIN to minify your javascript:
http://www.crockford.com/javascript/jsmin.html
I use perl's JavaScript::Minifier. It works pretty well and you can e.g. replace some phrases using perl.
Dean Edward's packer achieves some pretty good compression ratios. It has command line implementations which allows it to be used in a continuous integration process.
I use YUI Compressor. Seems to get the job done well!