Plaything for seeing how easy it is to build my own asset pipeline
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.



Yeah, real imaginative name. That's what you get after a night of drinking red wine and shouting in bars.

Anyway, this is just my attempt to see how easy it would be to create my own basic asset pipeline without the "excessive-ness" that is Sprockets+Hike+Tilt etc. It was just an idea, and should not be taken seriously.

It requires a "hacked" version of Rails which has the actionpack/lib/sprockets directory removed. This directory should have never been in Rails in the first place.

But why?

Dear god, if you're asking that question... are you some sort of boring accountant? It's just a fun thing to attempt to do. It's experimentation, which broadens the mind and untightens the blood vessels. Experimentation is the most fantastic way of learning new things or purely just seeing if something can be done. Try it one day. It works wonders.

How does it work?

(Excuse me, I've had many glasses of wine, it's late and I am europhoric from getting this thing working)

It works the same way as the Rails 3.1 asset pipeline, with a few modifications. For instance, it caches ALL the files included in the asset paths (app/assets, lib/assets and vendor/assets) for the Rails application and all its pretty little engines it has.

I think Sprockets caches the directories then searches through them to find the files, which is probably slow. Again: I think is the operative phrase here. I'm not saying that is precisely what it does, but it's what my mind is telling me it does.

The good thing about this new caching is that it reloads the cache each time in development, but will only cache them once in production. This means no lame precompilation (that's done on the fly, sorry!) and no stupid manifest file (what does that even do?!).

It does .scss precompilation only. Deal with it.