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
2009-11-25 01:55:05
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
2009-11-25 01:55:43
+1
A:
JavaScript minfiers do this for them. Two good ones that shrink private variables names are YUI Compressor and /packer/.
Eli Grey
2009-11-25 01:56:02