Skip to content
This repository has been archived by the owner on Nov 20, 2020. It is now read-only.

Keep comments? #15

Closed
Martii opened this issue Nov 18, 2014 · 3 comments
Closed

Keep comments? #15

Martii opened this issue Nov 18, 2014 · 3 comments

Comments

@Martii
Copy link

Martii commented Nov 18, 2014

Over at our project we could really use the keep comments option in this package from uglify-js but still minify everything else (in select JavaScript code)... any chance of that here?

TIA.

Martii referenced this issue in Martii/OpenUserJS.org Nov 18, 2014
* Unfortunately I don't see an option to keep comments. :\
* Disable minification in `sendMeta` and `sendScript`
* Missing in README.md ... added and whoops

Applies to OpenUserJS#417
@breezewish
Copy link
Owner

You can now pass UglifyJs options, for example keeping comment:

app.use(function(req, res, next)
{
    if (/\.(user|meta)\.js$/.test(req.url)) {
        res._uglifyOutput = {
            comments: true
        };
    }
    next();
});

@Martii
Copy link
Author

Martii commented Nov 20, 2014

Awesome!! I look forward to testing this... thank you. :)


btw great work with this... it's very easy to configure and use.

@Martii
Copy link
Author

Martii commented Nov 21, 2014

Working well here but a few issues with uglify-js and node release version. I'll see if I can perhaps address at least some of those across the pond.... closing... Thank you again.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants