sprockets

https://github.com/rails/sprockets

Ruby

Rack-based asset packaging system

Sprockets::SourceMapUtils#concat_source_maps

Public: Concatenate two source maps.

For an example, if two js scripts are concatenated, the individual source
maps for those files can be concatenated to map back to the originals.

Examples

    script3 = "#{script1}#{script2}"
    map3    = concat_source_maps(map1, map2)

a - Array of source mapping Hashes
b - Array of source mapping Hashes

Returns a new Array of source mapping Hashes.

Source | Google | Stack overflow

Edit

git clone [email protected]:rails/sprockets.git

cd sprockets

open lib/sprockets/source_map_utils.rb

Contribute

# Make a new branch

git checkout -b -your-name--update-docs-Sprockets--SourceMapUtils-concat_source_maps-for-pr


# Commit to git

git add lib/sprockets/source_map_utils.rbgit commit -m "better docs for Sprockets::SourceMapUtils#concat_source_maps"


# Open pull request

gem install hub # on a mac you can `brew install hub`

hub fork

git push <your name> -your-name--update-docs-Sprockets--SourceMapUtils-concat_source_maps-for-pr

hub pull-request


# Celebrate!