sprockets
https://github.com/rails/sprockets
Ruby
Rack-based asset packaging system
Sprockets::SourceMapUtils#encode_json_source_map
Public: Encode mappings to Source Map JSON. mappings - Array of Hash or String VLQ encoded mappings sources - Array of String sources names - Array of String names filename - String filename Returns JSON String.
Edit
git clone [email protected]:rails/sprockets.git
cd sprockets
open lib/sprockets/source_map_utils.rb
Contribute
# Make a new branchgit checkout -b -your-name--update-docs-Sprockets--SourceMapUtils-encode_json_source_map-for-pr
# Commit to gitgit add lib/sprockets/source_map_utils.rbgit commit -m "better docs for Sprockets::SourceMapUtils#encode_json_source_map"
# Open pull requestgem install hub # on a mac you can `brew install hub`
hub fork
git push <your name> -your-name--update-docs-Sprockets--SourceMapUtils-encode_json_source_map-for-pr
hub pull-request
# Celebrate!