推荐15个最好用的JavaScript代码压缩工具


Posted in Javascript onFebruary 13, 2019

JavaScript 代码压缩是指去除源代码里的所有不必要的字符,而不改变其功能的过程。这些不必要的字符通常包括空格字符,换行字符,注释以及块分隔符等用来增加可读性的代码,但并不需要它来执行。

在这篇文章中,我们选择了15个最好用的 JavaScript 压缩工具,有简单的在线转换器,GUI工具和命令行界面等。

1. JavaScript Minifier

推荐15个最好用的JavaScript代码压缩工具

It is a nice looking tool with an API to minify your js code.

2. JSMIni

推荐15个最好用的JavaScript代码压缩工具

If you want to minify your JavaScript or jQuery files quickly and easily, turn to jsMini. Just copy and paste your source code, select whether you want basic or full compression, and then minify your code.

3. JSCompress

推荐15个最好用的JavaScript代码压缩工具

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.

4. Minifier

推荐15个最好用的JavaScript代码压缩工具

A simple tool for minifying CSS/JS without a big setup. It reworks URLs in CSS from the original location to the output location. It automatically resolves @import statements in CSS.

5. Gulp.js

推荐15个最好用的JavaScript代码压缩工具

Gulp.js is the streaming build system. It's use of streams and code-over-configuration makes for a simpler and more intuitive build. By preferring code over configuration, gulp keeps simple things simple and makes complex tasks manageable. By harnassing the power of node's streams you get fast builds that don't write intermediary files to disk. Gulp's strict plugin guidelines assure plugins stay simple and work the way you expect.

6. Uglifyjs

推荐15个最好用的JavaScript代码压缩工具

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).

7. Grunt

推荐15个最好用的JavaScript代码压缩工具

Grunt is a task-based command line build tool for JavaScript projects. It has the following predefined tasks that you can use in your project: Concatenate files, Validate files with JSHint, Minify files with UglifyJS, Run unit tests with node unit and etc.

8. Koala

推荐15个最好用的JavaScript代码压缩工具

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.

9. Prepros

推荐15个最好用的JavaScript代码压缩工具

Prepros is a tool to compile LESS, Sass, Compass, Stylus, Jade and much more with automatic CSS prefixing, It comes with built in server for cross browser testing. It runs on windows, mac and linux.

10. Ajax Minifier

推荐15个最好用的JavaScript代码压缩工具

This tool is a Windows application that allows you to run the Microsoft Ajax Minifier without using the command line or Visual Studio. It minifies all javascript files in a folder and nested folders, minify individual javascript files, enable/disable the minifier's hypercrunch and analysis options and many more.

11. Smaller

推荐15个最好用的JavaScript代码压缩工具

Smaller is a powerful HTML, CSS and JavaScript compressor on OS X which also has the ability to combine several files into one. Compress your files and make your websites load faster.

12. Ultra Minifier

推荐15个最好用的JavaScript代码压缩工具

Ultra Minifier is the most simple YUI Compressor GUI to minify Javascript and CSS code without using the Terminal.

13. Require JS

推荐15个最好用的JavaScript代码压缩工具

RequireJS is a JavaScript file and module loader. It is optimized for in-browser use, but it can be used in other JavaScript environments, like Rhino and Node. Using a modular script loader like RequireJS will improve the speed and quality of your code. It includes an optimization tool you can run as part of your packaging steps for deploying your code. The optimization tool can combine and minify your JavaScript files to allow for better performance.

14. Online JavaScript/CSS Compressor

推荐15个最好用的JavaScript代码压缩工具

This is a web interface to compress your JavaScript or CSS. This tool uses UglifyJS 2, Clean-CSS and HTML Minifier.

15. Minify

推荐15个最好用的JavaScript代码压缩工具

Minify is a PHP5 app that helps you follow several of Yahoo!'s Rules for High Performance Web Sites. It combines multiple CSS or Javascript files, removes unnecessary whitespace and comments, and serves them with gzip encoding and optimal client-side cache headers.

总结

以上就是这篇文章的全部内容了,希望本文的内容对大家的学习或者工作具有一定的参考学习价值,谢谢大家对三水点靠木的支持。如果你想了解更多相关内容请查看下面相关链接

Javascript 相关文章推荐
Prototype使用指南之base.js
Jan 10 Javascript
jQuery总体架构的理解分析
Mar 07 Javascript
JS拖拽插件实现步骤
Aug 03 Javascript
js实现截图保存图片功能的代码示例
Feb 16 Javascript
node.js基于express使用websocket的方法
Nov 09 Javascript
vue2实现数据请求显示loading图
Nov 28 Javascript
玩转vue的slot内容分发
Sep 22 Javascript
如何使用vuex实现兄弟组件通信
Nov 02 Javascript
javaScript实现游戏倒计时功能
Nov 17 Javascript
浅谈Node新版本13.2.0正式支持ES Modules特性
Nov 25 Javascript
深入了解Vue3模板编译原理
Nov 19 Vue.js
Vue实现小购物车功能
Dec 21 Vue.js
Vue中CSS动画原理的实现
Feb 13 #Javascript
Vue中JS动画与Velocity.js的结合使用
Feb 13 #Javascript
JavaScript中.min.js和.js文件的区别讲解
Feb 13 #Javascript
node.js微信小程序配置消息推送的实现
Feb 13 #Javascript
vue实现购物车抛物线小球动画效果的方法详解
Feb 13 #Javascript
Jquery实现无缝向上循环滚动列表的特效
Feb 13 #jQuery
vuex实现的简单购物车功能示例
Feb 13 #Javascript
You might like
PHP通过COM使用ADODB的简单例子
2006/12/31 PHP
php xml-rpc远程调用
2008/12/19 PHP
反射调用private方法实践(php、java)
2015/12/21 PHP
PHPExcel实现表格导出功能示例【带有多个工作sheet】
2018/06/13 PHP
Javascript实现的分页函数
2007/02/07 Javascript
JS网络游戏-(模拟城市webgame)提供的一些例子下载
2007/10/14 Javascript
qTip2 精致的基于jQuery提示信息插件
2012/02/17 Javascript
我的Node.js学习之路(四)--单元测试
2014/07/06 Javascript
教你在heroku云平台上部署Node.js应用
2014/07/30 Javascript
详谈nodejs异步编程
2014/12/04 NodeJs
jquery实现未经美化的简洁TAB菜单效果
2015/08/28 Javascript
解决jquery中动态新增的元素节点无法触发事件问题的两种方法
2015/10/30 Javascript
微信小程序 侧滑删除(左滑删除)
2017/05/23 Javascript
微信小程序获取用户信息的两种方法wx.getUserInfo与open-data实例分析
2019/05/03 Javascript
Node.js 多进程处理CPU密集任务的实现
2019/05/26 Javascript
jQuery - AJAX load() 实例用法详解
2019/08/27 jQuery
vue学习之Vue-Router用法实例分析
2020/01/06 Javascript
vue使用Sass时报错问题的解决方法
2020/10/14 Javascript
python正则表达式修复网站文章字体不统一的解决方法
2013/02/21 Python
Python写的贪吃蛇游戏例子
2014/06/16 Python
详解如何用OpenCV + Python 实现人脸识别
2017/10/20 Python
python使用requests模块实现爬取电影天堂最新电影信息
2019/04/03 Python
Python提取转移文件夹内所有.jpg文件并查看每一帧的方法
2019/06/27 Python
Tensorflow 多线程设置方式
2020/02/06 Python
Python Numpy 控制台完全输出ndarray的实现
2020/02/19 Python
在django admin中配置搜索域是一个外键时的处理方法
2020/05/20 Python
CSS3提交意见输入框样式代码
2014/10/30 HTML / CSS
英国最大最好的无人机商店:Drones Direct
2019/07/12 全球购物
举例说明类变量和实例变量的区别
2016/06/30 面试题
厨师长岗位职责
2014/03/02 职场文书
教师竞聘演讲稿
2014/05/16 职场文书
班主任师德师风自我剖析材料
2014/10/02 职场文书
党的群众路线教育实践活动总结
2014/10/30 职场文书
2015年艾滋病宣传活动总结
2015/03/27 职场文书
拯救大兵瑞恩观后感
2015/06/09 职场文书
党员干部学习心得体会
2016/01/23 职场文书