Skip to content

Request: CLI flags to set path values to custom strings #100

@bdkjones

Description

@bdkjones

REQUEST

I would like the CLI interface to provide flags so that I can directly set these two parameters to whatever strings I'd like:

  1. the value for the "sourceMappingURL" path in the minified output file's special comment.

  2. the value for "sourceRoot" parameter in the *.map file.

JUSTIFICATION

The current system for setting these parameters involves passing the location of the "origin" file plus the "-p" flag with an arbitrary number of path components to lopp off. This system may make sense in some contexts, but it's awkward and clumsy when Uglify.js is integrated into other products (such as an app).

I write CodeKit, and it would be a hell of a lot faster and better if I could just tell Uglify, "Here is the string I want you to set for each of these parameters." I already know what the paths should be, but I have to jump through a bunch of hoops to use this awkward API with -p and such.

BOUNTY

I'm willing to kick in financially to see this feature implemented. I need it quite a bit

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions