mozilla / mozilla/source-map

Add minimal CLI tool to recover original source

Open
#484 5 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
3.7k
Forks
370
PR merge metrics
No merged PRs in 30d

Description

I know we can write our own, and that there are a couple of existing projects out there, but it would be cool if source-map contained a minimal CLI tool that allowed us to recover the original source of a file, given it's sourcemap'd file.

Eg. Given the following files:

  • foo.js.map (sourcemap)
  • foo.js (minified)

I would imagine being able to run it as follows (or similar):

npx source-map foo.js.map > foo.js.orig

See Also

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the existing source-map API and the linked source-map CLI implementations. Use the foo.js.map and foo.js example to define the command's input and output behavior, then verify that the CLI recovers the original source as foo.js.orig.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, node.js
Domain
cli, tooling
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.