推荐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 相关文章推荐
爆炸式的JS圆形浮动菜单特效代码
Mar 03 Javascript
javascript小组件 原生table排序表格脚本(兼容ie firefox opera chrome)
Jul 25 Javascript
不同的jQuery API来处理不同的浏览器事件
Dec 09 Javascript
弹出窗口并且此窗口带有半透明的遮罩层效果
Mar 13 Javascript
jquery动态添加删除一行数据示例
Jun 12 Javascript
PHP中使用微秒计算脚本执行时间例子
Nov 19 Javascript
浅谈javascript中关于日期和时间的基础知识
Jul 13 Javascript
vue.js中$watch的用法示例
Oct 04 Javascript
Vue.js开发环境搭建
Nov 10 Javascript
element el-input directive数字进行控制
Oct 11 Javascript
JQuery获取元素尺寸、位置及页面滚动事件应用示例
May 14 jQuery
vue导入.md文件的步骤(markdown转HTML)
Dec 31 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经典面试题之设计模式(经常遇到)
2015/10/15 PHP
PHP大神的十大优良习惯
2016/09/14 PHP
utf8的编码算法 转载
2006/12/27 Javascript
jQuery学习笔记之jQuery的动画
2010/12/22 Javascript
javascript 学习笔记(一)DOM基本操作
2011/04/08 Javascript
JQuery循环滚动图片代码
2011/12/08 Javascript
在JavaScript中实现类的方式探讨
2013/08/28 Javascript
nodejs爬虫抓取数据之编码问题
2015/07/03 NodeJs
jquery关于事件冒泡和事件委托的技巧及阻止与允许事件冒泡的三种实现方法
2015/11/27 Javascript
微信jssdk在iframe页面失效问题的解决措施
2016/03/03 Javascript
jQuery基于正则表达式的表单验证功能示例
2017/01/21 Javascript
node.js的事件机制
2017/02/08 Javascript
JavaScript表单验证实现代码
2017/05/22 Javascript
详解angularJS+Ionic移动端图片上传的解决办法
2017/09/13 Javascript
移动端自适应flexible.js的使用方法(不用三大框架,仅写一个单html页面使用)推荐
2019/04/02 Javascript
JavaScript中工厂函数与构造函数示例详解
2019/05/06 Javascript
在layui tab控件中载入外部html页面的方法
2019/09/04 Javascript
vue实现节点增删改功能
2019/09/26 Javascript
JS实现多功能计算器
2020/10/28 Javascript
[03:49]DOTA2英雄基础教程 光之守卫
2014/01/14 DOTA
Python实现控制台输入密码的方法
2015/05/29 Python
Python素数检测实例分析
2015/06/15 Python
Python的Django框架中URLconf相关的一些技巧整理
2015/07/18 Python
Python第三方库的安装方法总结
2016/06/06 Python
Python 迭代器与生成器实例详解
2017/05/18 Python
Python生成器定义与简单用法实例分析
2018/04/30 Python
Python爬取成语接龙类网站
2018/10/19 Python
python3 assert 断言的使用详解 (区别于python2)
2019/11/27 Python
python小项目之五子棋游戏
2019/12/26 Python
pycharm无法安装第三方库的问题及解决方法以scrapy为例(图解)
2020/05/09 Python
keras用auc做metrics以及早停实例
2020/07/02 Python
Python如何使用vars返回对象的属性列表
2020/10/17 Python
工艺员岗位职责
2014/02/11 职场文书
五一手机促销方案
2014/03/08 职场文书
检讨书格式
2019/04/25 职场文书
js基于div丝滑实现贝塞尔曲线
2022/09/23 Javascript