There are good reasons to compile Javascript. Code obfuscation and reducing file size are among them. If you've got some hard-won code, you may want to really obfuscate it by scrambling variable and method names. But if you're in the market for something that does 80% of the job in 5 minutes and one line of shell script, try this. This one line will crunch your Javascript, remove all line breaks, and clean up spaces between html tags and js curly braces. The caveat is that you should be sure to end all your javascript lines with semicolons (";'") and only use /* */ style commenting -- no // style commenting.
cat in.html | tr -d '\r\n' | sed -e 's/>\s*</></g' | sed -e 's/;\s*/;/g' |sed -e 's/}\s*/}/g' | sed -e 's/{\s*/{/g' > out.html