|
|
|
|
|
by msiebuhr
3385 days ago
|
|
AFAIK, this could also be written as a transform in AssetGraph [https://github.com/assetgraph/assetgraph], which does all of the loading, parsing and traversing for you. At least the given description reads like the internals of the population/loader-system in AssetGraph. As an added benefit, you'll get de-duplication, minification, inlining (with fallbacks) and, with a little work, image-spriting thrown in almost for free. If you want to play around easily, take a look at https://github.com/assetgraph/assetgraph-builder |
|