Reputation: 66478
This is similar question to this Uglify-js doesn't mangle variable names but I run uglify-js from command line, I've try to call with --mt option like this:
uglifyjs -o jquery.terminal.min.js --comments --mt -- jquery.terminal.js
but I've got this as result:
(function(ctx){var sprintf=function(){if(!sprintf.cache.hasOwnProperty(arguments[0])){sprintf.cache[arguments[0]]=sprintf.parse(arguments[0])}return sprintf.format.call(null,sprintf.cache[arguments[0]],arguments)};
but on the site I've got this as result:
!function(a){function d(a){return Object.prototype.toString.call(a).slice(8,-1).toLowerCase()}function e(a,b){for(var c=[];b>0;c[--b]=a);return c.join("")}var b=function(){return b.cache.hasOwnProperty(arguments[0])||(b.cache[arguments[0]]=b.parse(arguments[0])),b.format.call(null,b.cache[arguments[0]],arguments)};
Upvotes: 1
Views: 1653
Reputation: 66478
It seems that there is undocumented (in README on github) option --mangle
:
uglifyjs -o terminal.min.js --comments --mangle -- jquery.terminal-0.10.7.js
Upvotes: 2