推荐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 相关文章推荐
jQuery实现列表自动滚动循环滚动展示新闻
Aug 22 Javascript
jQuery实现多级下拉菜单jDropMenu的方法
Aug 28 Javascript
火狐和ie下获取javascript 获取event的方法(推荐)
Nov 26 Javascript
过期软件破解办法实例详解
Jan 04 Javascript
Vue computed计算属性的使用方法
Jul 14 Javascript
JS从非数组对象转数组的方法小结
Mar 26 Javascript
详解React之父子组件传递和其它一些要点
Jun 25 Javascript
详解JWT token心得与使用实例
Aug 02 Javascript
jQuery实现的记住帐号密码功能完整示例
Aug 03 jQuery
JavaScript直接调用函数与call调用的区别实例分析
May 22 Javascript
微信小程序完美解决scroll-view高度自适应问题的方法
Aug 08 Javascript
Openlayers学习之加载鹰眼控件
Sep 28 Javascript
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动态生成虚拟现实VRML网页
2006/10/09 PHP
php中 ob_start等函数截取标准输出的方法
2015/06/22 PHP
php技巧小结【推荐】
2017/01/19 PHP
Laravel框架分页实现方法分析
2018/06/12 PHP
PHP单例模式实例分析【防继承,防克隆操作】
2019/05/22 PHP
Javascript 匿名函数及其代码模式原理
2010/03/19 Javascript
分享精心挑选的23款美轮美奂的jQuery 图片特效插件
2012/08/14 Javascript
jquery获取tr中控件值并操作tr实现思路
2013/03/27 Javascript
javascript抖动元素的小例子
2013/10/28 Javascript
javascript判断chrome浏览器的方法
2014/03/26 Javascript
JQuery右键菜单插件ContextMenu使用指南
2014/12/19 Javascript
director.js实现前端路由使用实例
2015/02/03 Javascript
JS控制层作圆周运动的方法
2016/06/20 Javascript
BootStrap Table对前台页面表格的支持实例讲解
2016/12/22 Javascript
使用 Vue 绑定单个或多个 Class 名的实例代码
2018/01/08 Javascript
jQuery实现的页面弹幕效果【测试可用】
2018/08/17 jQuery
微信小程序wx:for循环的实例详解
2018/10/07 Javascript
微信小程序--获取用户地理位置名称(无须用户授权)的方法
2019/04/29 Javascript
JS+html5实现异步上传图片显示上传文件进度条功能示例
2019/11/09 Javascript
python 实现网上商城,转账,存取款等功能的信用卡系统
2016/07/15 Python
详解python使用递归、尾递归、循环三种方式实现斐波那契数列
2018/01/16 Python
python3实现公众号每日定时发送日报和图片
2018/02/24 Python
Python使用jsonpath-rw模块处理Json对象操作示例
2018/07/31 Python
opencv python 图像轮廓/检测轮廓/绘制轮廓的方法
2019/07/03 Python
python买卖股票的最佳时机(基于贪心/蛮力算法)
2019/07/05 Python
使用Python实现图像标记点的坐标输出功能
2019/08/14 Python
Eclipse面试题
2014/03/22 面试题
事业单位请假制度
2014/01/13 职场文书
结婚喜宴家长答谢词
2014/01/15 职场文书
模具设计与制造专业推荐信
2014/02/16 职场文书
关于中国梦的演讲稿
2014/04/23 职场文书
小学综合实践活动总结
2014/07/07 职场文书
2015届大学生就业推荐表自我评价
2014/09/27 职场文书
javascript遍历对象的五种方式实例代码
2021/10/24 Javascript
世界十大儿童漫画书排名,法国国宝漫画排第五,第二是轰动日本连环
2022/03/18 欧美动漫
如何使用注解方式实现 Redis 分布式锁
2022/07/23 Redis