今天就为大家分享一篇关于推荐2020年最好用的JavaScript代码压缩工具,觉得内容挺不错的,现在分享给大家,具有很好的参考价值,需要的朋友一起跟随来看看吧
JavaScript 代码压缩是指去除源代码里的所有不必要的字符,而不改变其功能的过程。这些不必要的字符通常包括空格字符,换行字符,注释等辅助阅读理解得到字符串。
压缩工具包括简单的在线转换器,GUI工具和命令行界面。
1. JavaScript Minifier

It is a nice looking tool with an API to minify your js code.
2. JSCompress
JSCompress.com is an online javascript compressor that allows you to compress and minify your javascript files. Compressed javascript files are ideal for production environments since they typically reduce the size of the file by 30-90%. Most of the filesize reduction is achieved by removing comments and extra whitespace characters that are not needed by web browsers or visitors.
3. Uglifyjs

This package implements a general-purpose JavaScript parser/compressor/beautifier toolkit. It is developed on NodeJS, but it should work on any JavaScript platform supporting the CommonJS module system (and if your platform of choice doesn't support CommonJS, you can easily implement it, or discard the exports.* lines from UglifyJS sources).
4. Koala

Koala is a GUI application for Less, Sass, Compass and CoffeeScript compilation, to help web developers to use them more efficiently. Koala can run in windows, linux and mac.
5. Online JavaScript/CSS Compressor

This is a web interface to compress your JavaScript or CSS. This tool uses UglifyJS 2, Clean-CSS and HTML Minifier.
6、发现没有,全是外国字儿,因为都是外国人的作品。看到这里小编的心里不是那么舒服,还好下面给各位看官老爷推荐一个中国人的作品:HCJCompress(ihongmeng.com.cn)。 功能上不一样。例如,各种代码文件联合压缩,压缩率高;还有代码还原功能,调试bug顺手。

浙公网安备 33010602011771号