Including Javascript files into your application is simple, but for each, a HTTP call has to be made back to the server and its contents pulled down. Ed Eliot decided he wanted to compress things a bit more so he created this script to push them all into one file dynamically.
I hate maintaining this stuff manually so I've written a PHP script which takes care of merging files on the fly whilst also versioning the merged file automatically as the various component files change.
He gives an example of this simple script - defining which files to compress, defining the directory to pull them from, and using mod_rewrite to handle the Javascript file requests.