First attempt to put all the script.aculo.us files into one file failed with mismatched dependencies. I had to find out the correct order to concat the files. As I found out the order should be scriptaculous.js, builder.js, effects.js, controls.js, dragdrop.js, slider.js, sound.js (I have specifically left out unittest.js). If you want you can throw in Prototype into the mix at the begining as it is required by script.aculo.us (I did that).
Run the following command in a shell prompt from the script.aculo.us root. to concat prototype and script.aculo.us.
$ cat lib/prototype.js src/scriptaculous.js src/builder.js src/effects.js src/controls.js src/dragdrop.js src/slider.js src/sound.js > scriptaculous.bundle.js
You need to download YUI compressor, run the following command.
$ java -jar /path/to/yui/compressor/build/yuicompressor.jar scriptaculous.bundle.js -o scriptaculous.bundle.min.js
In my case I use YUI compressor version 2.3.5 and script.aculo.us 1.8.1, and the file sizes were 244KB scriptaculous.bundle.js and 146KB scriptaculous.bundle.min.js. That’s a 40% compression.
You can download the compressed and bundled script.aculo.us scriptaculous.bundle.min.js. Hope someone will finds it useful.