Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I compact/minimize/pack my javascript? [duplicate]

Possible Duplicate:
What do you use to minimize and compress JavaScript libraries?

Sometimes you'll see two different files like "jquery.1.3.2.js" and "jquery.1.3.2-min.js". The "min" version has all the whitespace and comments removed.

Is there a tool that will do that for me or do I have to do it manually?

like image 725
Joy P. Avatar asked Nov 27 '22 23:11

Joy P.


1 Answers

Yes. The term you're looking for is "minify" your javascript.

Jsmin, Packer, and ShrinkSafe are all good tools. But the leader is YUI Compressor.

like image 64
Rap Avatar answered Dec 10 '22 01:12

Rap