简体   繁体   中英

Uglify-js from command line doesn't mangle variable names

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)};

似乎有未证明的(在README上)选项--mangle

uglifyjs -o terminal.min.js --comments --mangle -- jquery.terminal-0.10.7.js

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM