This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (pypi.python.org).
Help us improve Python packaging - Donate today!

Swiss knife for sourcemaps

Project Description
You can concatenate and cascade sourcemaps.
Even with raw code snippets without sourcemaps!

For instance, we have two javascript files with sourcemaps:

  • a.js
  • a.map
  • b.js
  • b.map

We can join them into one:

sourcemap_tool.py concat \
  --file a.js \
  --file b.js \
  --outfile concat.js --outmap concat.map

We can even concat with raw javascript code without sourcemaps:

echo ';(function(){' > open.js
echo '})();' > close.js
sourcemap_tool.py concat \
  --file open.js \
  --file a.js \
  --file b.js \
  --file close.js \
  --outfile concat.js --outmap concat.map

Finally we want to compress the code:

closure-compiler --charset UTF-8 -O SIMPLE \
  --js concat.js \
  --create_source_map closure.map \
  --js_output_file result.js
sourcemap_tool.py cascade \
  concat.map \
  closure.map \
  result.js.map \
  --fixmapurl result.js

result.js.map will map to your original sources!

Release History

Release History

This version
History Node

0.1.1

History Node

0.1

Download Files

Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
sourcemap_tool-0.1.1-py3-none-any.whl (9.2 kB) Copy SHA256 Checksum SHA256 py3 Wheel Dec 4, 2016

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting