class Sprockets::SourceMapProcessor

The purpose of this class is to generate a source map file that can be read and understood by browsers.

When a file is passed in it will have a ‘application/js-sourcemap+json` or `application/css-sourcemap+json` mime type. The filename will be match the original asset. The original asset is loaded. As it gets processed by Sprockets it will acquire all information needed to build a source map file in the `asset.to_hash[:map]` key.

The output is an asset with a properly formatted source map file:

{
  "version": 3,
  "sources": ["foo.js"],
  "names":   [ ],
  "mappings": "AAAA,GAAIA"
}