Sometime last year I was considering the present state of asset processing in Ruby. The Rails asset pipeline — the Sprockets library plus some Rails-specific coupling — was a source of frustration for friends and colleagues. In a moment of folly I decided to write my own Ruby asset processing tool. I hoped that doing so would at least help me to understand the space a little better. The result is Pannier.
The anti-feature I like the most is that there is absolutely no enforced plugin
ecosystem. No sad list of sub-libraries to browse. No scattergun, half-baked
package system. One of my favourite concepts from the Ruby world is that any
callable Ruby object (block, proc, lambda, object reponding to
be a Rack application. The same applies to asset modifiers in Pannier.
Pannier can be mounted within any Rack application, in which case Rack is used
to serve the assets and some basic helpers are provided for generating
<script> tags. It can also be used outside of web applications entirely,
in the same way you might use a
Makefile. I use it in this way on a number of
my own static sites.
For further details, you can check out the project on GitHub or read the documentation.