occasionally useful ruby, ubuntu, etc

22Feb/090

Sprockets — it's a good thing

Came across an interesting utility library: Sprockets. It's a Ruby-powered Javascript preprocessor. It's used for three things -- embedding other js files into the current js file, ensuring required assets get copied to the assets root, and for interpolating constants (like version numbers, author, etc) into the js file. I found it browsing Prototype.js's source -- really cool stuff. Also funny because I came across it by accident and I was just contemplating designing an identical tool. Good thing and bad thing at the same time :)