Unpack JavaScript source maps into source files
Project description
py_unpack_sourcemap
Unpack JavaScript source maps into source files
Description
This Python tool allows you to unpack JavaScript source maps into their corresponding source files. It can be particularly useful for debugging and analyzing minified JavaScript code in production environments.
Modern browsers like Chrome and Firefox provide this functionality in DevTools. However, they only let you view the source code in the browser itself, which can be limiting. This tool allows you to extract the whole source tree for viewing it in your favourite IDE.
Installation
Ensure you have Python 3.10 or later installed. The package is not tested on older versions, but they will probably work.
You can install the tool from PyPI using pip:
pip install py_unpack_sourcemap
Or Poetry:
poetry add py_unpack_sourcemap
Usage
As a command-line tool
python -m py_unpack_sourcemap [-h] -o OUTPUT_DIR sourcemap
positional arguments:
sourcemap path to the source map (a .js.map file)
options:
-h, --help show this help message and exit
-o OUTPUT_DIR, --output-dir OUTPUT_DIR
a directory to extract source files into
As a Python module
No information here yet :( Use autocompletion or view the source code.
Contributing
Any contributions are appreciated. Regular stuff. Don't be afraid to create issues for any features you need.
Contributors
- lonelyteapot - Original author
License
This project is licensed under the MIT License.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for py_unpack_sourcemap-1.0.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 577dd78c30e839aba41b870b91fd1ce44e10e05efb1ceac683cd587714c9cfe2 |
|
MD5 | 8cce8b0050602510fc52aee739df6158 |
|
BLAKE2b-256 | fd2a378f83156b75a9123c38fe84fb1c7469287c716eb3b9822d027351855cf1 |
Hashes for py_unpack_sourcemap-1.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e3e42ae01ab6151f9ab673f47a872f447b88a5fe55733b0d797280742ef77849 |
|
MD5 | 11b5940126fcada64fab677213764865 |
|
BLAKE2b-256 | b7429505ae14d32e26ebe49a2636acbfb642b7390b9d80eccc2f7df21f9e3e64 |