Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
**Master**

- Preserve existing source maps when adding line counts. [Oskar Eichler](https://github.com/OskarEichler)

Get upgrade notes from Sprockets 3.x to 4.x at https://github.com/rails/sprockets/blob/master/UPGRADING.md

# 4.4.1
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ If you want to work on Sprockets or better understand how it works read [How Spr

## Behavior Overview

The default source-map preprocessor copies an existing map before adding line-count metadata, preserving caller-owned and frozen maps.

You can interact with Sprockets primarily through directives and file extensions. This section covers how to use each of these things, and the defaults that ship with Sprockets.

Since you are likely using Sprockets through another framework (such as the [Rails asset pipeline](http://guides.rubyonrails.org/asset_pipeline.html)), there will be configuration options you can toggle that will change behavior such as what directories or files get compiled. For that documentation you should see your framework's documentation.
Expand Down
2 changes: 1 addition & 1 deletion lib/sprockets/preprocessors/default_source_map.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def call(input)
"names" => []
}
else
result[:map] = map
result[:map] = map.dup
end

result[:map]["x_sprockets_linecount"] = lines
Expand Down