推荐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 ECMA-262-3 深入解析.第三章.this
Sep 28 Javascript
推荐40款强大的 jQuery 导航插件和教程(上篇)
Sep 14 Javascript
捕获和分析JavaScript Error的方法
Mar 25 Javascript
解析javascript中鼠标滚轮事件
May 26 Javascript
JavaScript实现简单的tab选项卡切换
Jan 05 Javascript
Js遍历键值对形式对象或Map形式的方法
Aug 08 Javascript
Vue2.0表单校验组件vee-validate的使用详解
May 02 Javascript
js中如何完美的解析数据
Mar 18 Javascript
JS+html5实现异步上传图片显示上传文件进度条功能示例
Nov 09 Javascript
如何利用javascript接收json信息并进行处理
Aug 06 Javascript
vue等两个接口都返回结果再执行下一步的实例
Sep 08 Javascript
JavaScript手写数组的常用函数总结
Nov 22 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手机号码归属地查询代码(API接口/mysql)
2012/09/04 PHP
php实现遍历多维数组的方法
2015/11/25 PHP
php rmdir使用递归函数删除非空目录实例详解
2016/10/20 PHP
visual studio code 调试php方法(图文详解)
2017/09/15 PHP
php设计模式之状态模式实例分析【星际争霸游戏案例】
2020/03/26 PHP
js 异步处理进度条
2010/04/01 Javascript
js使用函数绑定技术改变事件处理程序的作用域
2011/12/26 Javascript
用原生JS获取CLASS对象(很简单实用)
2014/10/15 Javascript
在JavaScript中使用开平方根的sqrt()方法
2015/06/15 Javascript
跟我学习javascript的异步脚本加载
2015/11/20 Javascript
基于javascript编写简单日历
2016/05/02 Javascript
BootStrap制作导航条实例代码
2016/05/06 Javascript
Json对象和字符串互相转换json数据拼接和JSON使用方式详细介绍(小结)
2016/10/25 Javascript
js常用的继承--组合式继承
2017/03/06 Javascript
vue中的event bus非父子组件通信解析
2017/10/27 Javascript
利用vue + koa2 + mockjs模拟数据的方法教程
2017/11/22 Javascript
jQuery删除/清空指定元素的所有子节点实例代码
2019/07/04 jQuery
JS数据类型STRING使用实例解析
2019/12/18 Javascript
js 将多个对象合并成一个对象 assign方法的实现
2020/09/24 Javascript
Django中模版的子目录与include标签的使用方法
2015/07/16 Python
Python之list对应元素求和的方法
2018/06/28 Python
python3使用matplotlib绘制散点图
2019/03/19 Python
python按比例随机切分数据的实现
2019/07/11 Python
Python 利用邮件系统完成远程控制电脑的实现(关机、重启等)
2019/11/19 Python
python十进制转二进制的详解
2020/02/07 Python
python第三方库学习笔记
2020/02/07 Python
python except异常处理之后不退出,解决异常继续执行的实现
2020/04/25 Python
Pandas的Apply函数具体使用
2020/07/21 Python
HTML5的video标签的浏览器兼容性增强方案分享
2016/05/19 HTML / CSS
html5在移动端的屏幕适应问题示例探讨
2014/06/15 HTML / CSS
预备党员思想汇报
2014/01/08 职场文书
新兵入伍心得体会
2014/09/04 职场文书
教师自查自纠材料
2014/10/14 职场文书
2014年幼儿园后勤工作总结
2014/11/10 职场文书
面试分析分布式架构Redis热点key大Value解决方案
2022/03/13 Redis
Oracle使用别名的好处
2022/04/19 Oracle