推荐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 相关文章推荐
Javascript 阻止javascript事件冒泡,获取控件ID值
Jun 27 Javascript
用Javascript评估用户输入密码的强度(Knockout版)
Nov 30 Javascript
jquery进行数组遍历如何跳出当前的each循环
Jun 05 Javascript
js实现贪吃蛇小游戏(容易理解)
Jan 22 Javascript
JS实现控制图片显示大小的方法【图片等比例缩放功能】
Feb 18 Javascript
ES6新特性:使用export和import实现模块化详解
Jul 31 Javascript
详解js正则表达式验证时间格式xxxx-xx-xx形式
Feb 09 Javascript
JavaScript callback回调函数用法实例分析
May 08 Javascript
javascript深拷贝、浅拷贝和循环引用深入理解
May 27 Javascript
JS 验证码功能的三种实现方式
Nov 26 Javascript
js实现图片局部放大效果详解
Mar 18 Javascript
原生JS实现汇率转换功能代码实例
May 13 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 Class&Object -- PHP 自排序二叉树的深入解析
2013/06/25 PHP
PHP错误机制知识汇总
2016/03/24 PHP
PHP中file_exists使用中遇到的问题小结
2016/04/05 PHP
PHP实现给定一列字符,生成指定长度的所有可能组合示例
2019/06/22 PHP
json 定义
2008/06/10 Javascript
js 匿名调用实现代码
2009/06/19 Javascript
javascript学习笔记(十) js对象 继承
2012/06/19 Javascript
jQuery的Ajax的自动完成功能控件简要说明
2013/02/22 Javascript
JQueryEasyUI datagrid框架的进阶使用
2013/04/08 Javascript
NodeJS Web应用监听sock文件实例
2015/02/18 NodeJs
jquery可定制的在线UEditor编辑器
2015/11/17 Javascript
学习JavaScript设计模式(多态)
2015/11/25 Javascript
Jquery检验手机号是否符合规则并根据手机号检测结果将提交按钮设为不同状态
2015/11/26 Javascript
获取阴历(农历)和当前日期的js代码
2016/02/15 Javascript
js实现五星评价功能
2017/03/08 Javascript
使用Require.js封装原生js轮播图的实现代码
2017/06/15 Javascript
浅谈JS封闭函数、闭包、内置对象
2017/07/18 Javascript
weebox弹出窗口不居中显示的解决方法
2017/11/27 Javascript
基于bootstrap页面渲染的问题解决方法
2018/08/09 Javascript
解决echarts 一条柱状图显示两个值,类似进度条的问题
2020/07/20 Javascript
详解常用查找数据结构及算法(Python实现)
2016/12/09 Python
将Python文件打包成.EXE可执行文件的方法
2019/08/11 Python
python将字典列表导出为Excel文件的方法
2019/09/02 Python
使用Python构造hive insert语句说明
2020/06/06 Python
pytorch学习教程之自定义数据集
2020/11/10 Python
python中turtle库的简单使用教程
2020/11/11 Python
通过HTML5规范搞定i、em、b、strong元素的区别
2017/03/04 HTML / CSS
微信小程序“圣诞帽”的实现思路详解
2017/12/28 HTML / CSS
Annoushka英国官网:英国奢侈珠宝品牌
2018/10/20 全球购物
大学三年的自我评价
2013/12/25 职场文书
销售顾问岗位职责
2014/02/25 职场文书
中学生关于梦想的演讲稿
2014/08/22 职场文书
校外活动方案
2014/08/28 职场文书
2015年党员承诺书
2015/01/21 职场文书
2016年过年放假安排通知
2015/08/18 职场文书
销售会议开幕词
2016/03/04 职场文书