Sprockets can be used for JS, CSS, images, and so on, because it is so simple: it is "just" concatenation. I understand and agree on the benefit/complexity argument.
But the fact that this method works universally, is also the reason it cannot accomodate individual needs for each "asset type" (css, js):
* For Javascript we cannot use CommonJS (or something similar)
* For SCSS we cannot use variables, mixins
For me, this means a lot. Traditionally, Rails has been giving me the best web environment experience I could imagine. With Rails 3.1, I can't help thinking: Why did they leave some of the best parts out?
I know I actually CAN use SCSS variables and mixins - I just have to use SCSS' @import rather than Sprockets own =require. But that leads to my stance in this matter: If we need to bypass Sprockets in order to get the cool features, then why use it in the first place?
We should use a system designed specifically for JS to management our JS, and a system specifically for CSS to manage CSS. Stitch and SASS comes to mind of course.
While I understand the benefits of the "Sprockets way", I'd like to see Rails use specific tools for specific asset types in order to give developers easy access to all of the available features instead of just 80% of them.
I don't know what it is called. It was just mounted on top of the pencil when I bought it. Like a little hat. It works great. Have a look.
http://www.bonsai7.dk/assets/images/pencil-eraser.jpg