views:

34

answers:

4

I noticed that the production version of jquery has one-letter function and variable name and was wondering how they achieve that. are there tools to create a production level javascript file from the one use during development? I am having a hard time figuring out how they make sure there are no mistakes, especially for an open source project that big.

A: 

You would use one of many JS minifiers like JSMin or Google Closure Compiler to achieve such results.

Marek Karbarz
A: 

It's called "minification" or "packing" and there's a lot of different tools which can do it for you, for example: Dean Edwards's Packer or YUI Compressor

nickf
+1  A: 

JavaScript minfiers do this for them. Two good ones that shrink private variables names are YUI Compressor and /packer/.

Eli Grey
A: 

I think you refer to JS minification, like YUI Compressor

http://developer.yahoo.com/yui/compressor/

S.Mark