推荐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里的dialog对话框插件为框架页(iframe) 的方法
Sep 14 Javascript
Javascript学习笔记二 之 变量
Dec 15 Javascript
javascript动态加载实现方法一
Aug 22 Javascript
Jquery通过Ajax方式来提交Form表单的具体实现
Nov 07 Javascript
深入分析JSONP跨域的原理
Dec 10 Javascript
jQuery+PHP实现微信转盘抽奖功能的方法
May 25 Javascript
JS代码实现百度地图 画圆 删除标注
Oct 12 Javascript
Javascript数组中push方法用法分析
Oct 31 Javascript
jQuery实现的checkbox级联选择下拉菜单效果示例
Dec 26 Javascript
vue中简单弹框dialog的实现方法
Feb 26 Javascript
vue.js编译时给生成的文件增加版本号
Sep 17 Javascript
javascript实现评分功能
Jun 24 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
ThinkPHP与PHPExcel冲突解决方法
2011/08/08 PHP
PHP中使用array函数新建一个数组
2015/11/19 PHP
PHP去除字符串最后一个字符的三种方法实例
2017/03/01 PHP
调试Node.JS的辅助工具(NodeWatcher)
2012/01/04 Javascript
深入理解javascript动态插入技术
2013/11/12 Javascript
Js 导出table内容到Excel的简单实例
2013/11/19 Javascript
js中精确计算加法和减法示例
2014/03/28 Javascript
js实现字符串的16进制编码不加密
2014/04/25 Javascript
JavaScript支持的最大递归调用次数分析
2014/06/24 Javascript
jQuery中parent()方法用法实例
2015/01/07 Javascript
jquery控制显示服务器生成的图片流
2015/08/04 Javascript
使用struts2+Ajax+jquery验证用户名是否已被注册
2016/03/22 Javascript
微信小程序 限制1M的瘦身技巧与方法详解
2017/01/06 Javascript
angularjs ocLazyLoad分步加载js文件实例
2017/01/17 Javascript
jquery中each循环的简单回滚操作
2017/05/05 jQuery
input框中自动展示当前日期yyyy/mm/dd的实现方法
2017/07/06 Javascript
分享ES6的7个实用技巧
2018/01/18 Javascript
JS实现用特殊符号替换字符串的中间部分区域的实例代码
2018/07/24 Javascript
Vue动态生成表格的行和列
2019/07/18 Javascript
vue element upload实现图片本地预览
2019/08/20 Javascript
JavaScript 作用域实例分析
2019/10/02 Javascript
vue 中 elment-ui table合并上下两行相同数据单元格
2019/12/26 Javascript
Vue父组件向子组件传值以及data和props的区别详解
2020/03/02 Javascript
[02:28]DOTA2亚洲邀请赛 LGD战队巡礼
2015/02/03 DOTA
Python中字典的setdefault()方法教程
2017/02/07 Python
对python中UDP,socket的使用详解
2019/08/22 Python
Python实现语音识别和语音合成功能
2019/09/20 Python
HTML5未来发展趋势
2016/02/01 HTML / CSS
地球鞋加拿大官网:Earth Shoes Canada
2020/11/17 全球购物
override和overload的区别
2016/03/09 面试题
租车协议书范本
2014/04/22 职场文书
商场周年庆活动方案
2014/08/19 职场文书
个人租房协议书(范本)
2014/10/14 职场文书
导师鉴定意见
2015/06/05 职场文书
2016年度先进班组事迹材料
2016/03/01 职场文书
应用最多的公文《通知》如何写?
2019/04/02 职场文书