Class: Propshaft::Compiler::SourceMappingUrls
- Inherits:
-
Propshaft::Compiler
- Object
- Propshaft::Compiler
- Propshaft::Compiler::SourceMappingUrls
- Defined in:
- lib/propshaft/compiler/source_mapping_urls.rb
Constant Summary collapse
- SOURCE_MAPPING_PATTERN =
%r{(//|/\*)# sourceMappingURL=(.+\.map)(\s*?\*\/)?\s*?\Z}
Instance Attribute Summary
Attributes inherited from Propshaft::Compiler
Instance Method Summary collapse
Methods inherited from Propshaft::Compiler
Constructor Details
This class inherits a constructor from Propshaft::Compiler
Instance Method Details
#compile(asset, input) ⇒ Object
8 9 10 |
# File 'lib/propshaft/compiler/source_mapping_urls.rb', line 8 def compile(asset, input) input.gsub(SOURCE_MAPPING_PATTERN) { source_mapping_url(asset.logical_path, asset_path($2, asset.logical_path), $1, $3) } end |