Mangling in UglifyJS - extra options

Nov 22, 2015 at 10:38 AM
Hi Taritsyn,

Thanks for making such an excellent tool (and source available).

Enjoying the scss transformer - thanks for the update - much faster.

I'm just modifying the code to support the UglifyJS to support a few extra options; we use command line.

uglifyjs --compress --mangle --mangle-props --reserve-domprops --reserved-file sampleProp.json --output Sample.min.js -- Sample.js

Had a look, and seems mangle-props, reserve-domprops, and reserved-file are not support - would you like to add, or shall I add and send to you?

Thanks.
Coordinator
Nov 23, 2015 at 8:14 AM
Hello, Newbusiness97!
Enjoying the scss transformer - thanks for the update - much faster.
I was not the first time heard rave reviews about the new version of BundleTransformer.SassAndScss module, but the LibSassHost repository don't have any stars ;-)
uglifyjs --compress --mangle --mangle-props --reserve-domprops --reserved-file sampleProp.json --output Sample.min.js -- Sample.js
I know about these options, but I used to think that they had no one will use it. Eight months ago, I spent a lot of time to implementation of externs support in the BundleTransformer.Closure module, but this opportunity is practically not used.
I'm just modifying the code to support the UglifyJS to support a few extra options; we use command line.
I try not to make calls of the command line applications in modules, in cases, when it is possible to use a JavaScriptEngineSwitcher.
Had a look, and seems mangle-props, reserve-domprops, and reserved-file are not support - would you like to add, or shall I add and send to you?
When I had enough free time, then I will add this functionality to the BundleTransformer.UglifyJs module.

How you apply these options: to bundle or to each file individually (like externs in the Closure Compiler)?
Nov 24, 2015 at 2:33 AM
Thanks Taritsyn
How you apply these options: to bundle or to each file individually (like externs in the Closure Compiler)?
In testing, I've been using the bundle. I combine 5 .js files into one bundle, then run uglify on them.

Currently using YUI, just for minimise, but want to obfuscate with uglifyjs. Got success using node version of uglify, and went to see if BundleTransformer supported it, and found just a few of the options missing.
I spent a lot of time to implementation of externs support in the BundleTransformer.Closure module,
Are you suggesting that the Closure compiler is better option ? Shall investigate. I didn't consider it because of the "requires connection to internet".
Coordinator
Nov 24, 2015 at 7:42 AM
Are you suggesting that the Closure compiler is better option ? Shall investigate. I didn't consider it because of the "requires connection to internet".
ClosureLocalJsMinifier does not require Internet connection.
Nov 30, 2015 at 12:42 AM
Excellent - I found the local option after a deeper look - thanks Taritsyn. :-)