sstephenson/sprockets — pull request #367 by ndbroadbent (2012-09-27 13:14:55+00:00)
Title: Allow assets to be fetched without processing, in order to generate a digest of their sources

This feature lets us determine if an asset's sources have changed. If not, then we don't need to recompile and recompress that asset.

If `:process => false` is passed as an option to `find_asset`, the only processors that are run are Sprockets Directives and ERB. Other processors, such as coffeescript and compression, are removed from the chain. This lets us quickly concatenate the raw dependencies and calculate the digest of the result. We can compare this digest on subsequent runs to determine if the file has changed.

In terms of the implementation, I was wondering if I should create a new `Sprockets::UnprocessedAsset` class for this. Please let me know your thoughts, and if I should rewrite this differently.

I haven't touched the Sprockets manifest generation code. Let me know if you want me to update that to include these source digests.

This PR is a dependency for changes to [sprockets-rails PR #TBA](), that speed up the Rails asset pipeline.

Thanks for your time!