# py_unpack_sourcemap
Unpack JavaScript source maps into source files
[![PyPI - Version](https://img.shields.io/pypi/v/py_unpack_sourcemap)][PyPI]
[![PyPI - Downloads](https://img.shields.io/pypi/dm/py_unpack_sourcemap)][PyPI]
[![PyPI - Status](https://img.shields.io/pypi/status/py_unpack_sourcemap)][PyPI]
[![License](https://img.shields.io/github/license/lonelyteapot/py_unpack_sourcemap)][GitHub]
## 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:
```sh
pip install py_unpack_sourcemap
```
Or [Poetry]:
```sh
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](https://github.com/lonelyteapot) - Original author
## License
This project is licensed under the [MIT License](https://mit-license.org/).
[GitHub]: https://github.com/lonelyteapot/py_unpack_sourcemap
[PyPI]: https://pypi.org/project/py_unpack_sourcemap/
[Poetry]: https://python-poetry.org/
Raw data
{
"_id": null,
"home_page": "https://github.com/lonelyteapot/py_unpack_sourcemap",
"name": "py_unpack_sourcemap",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.10,<4.0",
"maintainer_email": "",
"keywords": "sourcemaps",
"author": "Dmitry Semenov",
"author_email": "lonelyteapot@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/fd/2a/378f83156b75a9123c38fe84fb1c7469287c716eb3b9822d027351855cf1/py_unpack_sourcemap-1.0.0.tar.gz",
"platform": null,
"description": "# py_unpack_sourcemap\n\nUnpack JavaScript source maps into source files\n\n[![PyPI - Version](https://img.shields.io/pypi/v/py_unpack_sourcemap)][PyPI]\n[![PyPI - Downloads](https://img.shields.io/pypi/dm/py_unpack_sourcemap)][PyPI]\n[![PyPI - Status](https://img.shields.io/pypi/status/py_unpack_sourcemap)][PyPI]\n[![License](https://img.shields.io/github/license/lonelyteapot/py_unpack_sourcemap)][GitHub]\n\n\n## Description\n\nThis Python tool allows you to unpack JavaScript source maps into their\ncorresponding source files. It can be particularly useful for debugging and\nanalyzing minified JavaScript code in production environments.\n\nModern browsers like Chrome and Firefox provide this functionality in DevTools.\nHowever, they only let you view the source code in the browser itself, which can\nbe limiting. This tool allows you to extract the whole source tree for viewing\nit in your favourite IDE.\n\n## Installation\n\nEnsure you have Python 3.10 or later installed.\nThe package is not tested on older versions, but they will probably work.\n\nYou can install the tool from [PyPI] using pip:\n\n```sh\npip install py_unpack_sourcemap\n```\n\nOr [Poetry]:\n\n```sh\npoetry add py_unpack_sourcemap\n```\n\n\n## Usage\n\n### As a command-line tool\n\n```\npython -m py_unpack_sourcemap [-h] -o OUTPUT_DIR sourcemap\n\npositional arguments:\n sourcemap path to the source map (a .js.map file)\n\noptions:\n -h, --help show this help message and exit\n -o OUTPUT_DIR, --output-dir OUTPUT_DIR\n a directory to extract source files into\n```\n\n### As a Python module\n\n> No information here yet :( Use autocompletion or view the source code.\n\n## Contributing\n\nAny contributions are appreciated. Regular stuff.\nDon't be afraid to create issues for any features you need.\n\n## Contributors\n\n- [lonelyteapot](https://github.com/lonelyteapot) - Original author\n\n## License\n\nThis project is licensed under the [MIT License](https://mit-license.org/).\n\n\n[GitHub]: https://github.com/lonelyteapot/py_unpack_sourcemap\n[PyPI]: https://pypi.org/project/py_unpack_sourcemap/\n[Poetry]: https://python-poetry.org/\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Unpack JavaScript source maps into source files",
"version": "1.0.0",
"project_urls": {
"Bug Tracker": "https://github.com/lonelyteapot/py_unpack_sourcemap/issues",
"Homepage": "https://github.com/lonelyteapot/py_unpack_sourcemap",
"Repository": "https://github.com/lonelyteapot/py_unpack_sourcemap"
},
"split_keywords": [
"sourcemaps"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "b7429505ae14d32e26ebe49a2636acbfb642b7390b9d80eccc2f7df21f9e3e64",
"md5": "11b5940126fcada64fab677213764865",
"sha256": "e3e42ae01ab6151f9ab673f47a872f447b88a5fe55733b0d797280742ef77849"
},
"downloads": -1,
"filename": "py_unpack_sourcemap-1.0.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "11b5940126fcada64fab677213764865",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.10,<4.0",
"size": 4800,
"upload_time": "2023-10-20T06:23:09",
"upload_time_iso_8601": "2023-10-20T06:23:09.583554Z",
"url": "https://files.pythonhosted.org/packages/b7/42/9505ae14d32e26ebe49a2636acbfb642b7390b9d80eccc2f7df21f9e3e64/py_unpack_sourcemap-1.0.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "fd2a378f83156b75a9123c38fe84fb1c7469287c716eb3b9822d027351855cf1",
"md5": "8cce8b0050602510fc52aee739df6158",
"sha256": "577dd78c30e839aba41b870b91fd1ce44e10e05efb1ceac683cd587714c9cfe2"
},
"downloads": -1,
"filename": "py_unpack_sourcemap-1.0.0.tar.gz",
"has_sig": false,
"md5_digest": "8cce8b0050602510fc52aee739df6158",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.10,<4.0",
"size": 3676,
"upload_time": "2023-10-20T06:23:12",
"upload_time_iso_8601": "2023-10-20T06:23:12.208391Z",
"url": "https://files.pythonhosted.org/packages/fd/2a/378f83156b75a9123c38fe84fb1c7469287c716eb3b9822d027351855cf1/py_unpack_sourcemap-1.0.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-10-20 06:23:12",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "lonelyteapot",
"github_project": "py_unpack_sourcemap",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "py_unpack_sourcemap"
}