Skip to content

make preserving comments easier #1234

Description

@terinjokes

Hello, UglifyJS gang!

My project, gulp-uglify, is mostly a dumb wrapper of the UglifyJS2 API to integrate it within the Gulp ecosystem. I say mostly because many years ago I made one small improvement: I added a preserveComments option that made the output.comments option easier to use.

My additional option gives names to the two common ways people want to preserve comments. For example, "all" to match all of the comments and "license" to match the common ways to include license information (Closure Compiler directives, the first line of a file, comment includes tokens such as "Copyright" and "MIT", via uglify-save-license). ("some" is deprecated, but is an example of a middle ground between the two others)

I think upstreaming a similar option would be beneficial to UglifyJS users everywhere.

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