javascript 混淆:制作 file-min.js?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/3617347/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-10-25 01:44:54  来源:igfitidea点击:

obfuscate: Make file-min.js?

javascriptobfuscation

提问by olidev

For example, when I download Jquery, I see there is always 2 file: jquery.js and jquery-min.js.

例如,当我下载 Jquery 时,我看到总是有 2 个文件:jquery.js 和 jquery-min.js。

How could they create jQuery-min.js -> in this file, it is not only compressed but also obfuscated. Which tool is best to do this?

他们怎么能在这个文件中创建 jQuery-min.js -> ,它不仅被压缩而且还被混淆了。哪种工具最适合执行此操作?

I am working with Visual Studio 2010 Ultimate, would it be also possible as well?

我正在使用 Visual Studio 2010 Ultimate,是否也可以?

Thanks in advance!

提前致谢!

回答by Cipi

You can use this: http://dean.edwards.name/packer/pretty cool... and I believe jQuery is compressed using that. There are .NET, PHP and other versions HERE.

你可以使用这个:http: //dean.edwards.name/packer/非常酷...我相信 jQuery 是使用它压缩的。有.NET,PHP等版本HERE

For Visual Studio I use this: http://yuicustomtool.codeplex.com/.

对于 Visual Studio,我使用这个:http: //yuicustomtool.codeplex.com/

Checkout this too for CSS: https://csscompressor.net/

也可以查看 CSS:https: //csscompressor.net/

UPDATE:Recently I came across THIS. Its an Online YUI Compressor. Its useful if you are not able to run YUI Compressor EXE, or you haven't wrote your JS to be minification friendly (it adds ;by itself to the end of the object's definition for example).

更新:最近我遇到了这个。它是一个在线 YUI 压缩器。如果您无法运行 YUI Compressor EXE,或者您的 JS 没有编写对缩小友好的(例如,它;自己添加到对象定义的末尾),它会很有用。