推荐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的为attr添加id title等效果的实现代码
Apr 20 Javascript
js检测输入内容全为空格的方法
May 03 Javascript
Javascript毫秒数用法实例
Feb 05 Javascript
在AngularJS应用中实现一些动画效果的代码
Jun 18 Javascript
js计算时间差代码【包括计算,天,时,分,秒】
Apr 26 Javascript
有关jQuery中parent()和siblings()的小问题
Jun 01 Javascript
jQuery UI制作选项卡(tabs)
Dec 13 Javascript
Angularjs+bootstrap+table多选(全选)支持单击行选中实现编辑、删除功能
Mar 27 Javascript
node.js 核心http模块,起一个服务器,返回一个页面的实例
Sep 11 Javascript
javascript数据类型中的一些小知识点(推荐)
Apr 18 Javascript
基于mpvue小程序使用echarts画折线图的方法示例
Apr 24 Javascript
微信小程序实现蒙版弹出窗功能
Sep 17 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设计模式 State (状态模式)
2011/06/26 PHP
php防止网站被刷新的方法汇总
2014/12/01 PHP
PHP实现微信模拟登陆并给用户发送消息的方法【文字,图片,图文】
2017/06/29 PHP
thinkphp5+layui实现的分页样式示例
2019/10/08 PHP
php 使用 __call实现重载功能示例
2019/11/18 PHP
JavaScript中null与undefined分析
2009/07/25 Javascript
js购物车实现思路及代码(个人感觉不错)
2013/12/23 Javascript
javascript批量修改文件编码格式的方法
2015/01/27 Javascript
javascript计时器详解
2015/02/28 Javascript
js实现选中页面文字将其分享到新浪微博
2015/11/05 Javascript
AngularJs Understanding the Controller Component
2016/09/02 Javascript
AngularJS删除路由中的#符号的方法
2016/09/20 Javascript
JS中如何实现复选框全选功能
2016/12/19 Javascript
微信小程序开发之toast等弹框提示使用教程
2017/06/08 Javascript
JS中使用textPath实现线条上的文字
2017/12/25 Javascript
zTree 树插件实现全国五级地区点击后加载的示例
2018/02/05 Javascript
记录一次完整的react hooks实践
2019/03/11 Javascript
详解javascript函数写法大全
2019/03/25 Javascript
Vue组件系列开发之模态框
2019/04/18 Javascript
[40:56]2018DOTA2亚洲邀请赛 3.31 小组赛 A组 Liquid vs TNC
2018/04/01 DOTA
Python切片用法实例教程
2014/09/08 Python
分享一个常用的Python模拟登陆类
2015/03/29 Python
Python中的迭代器与生成器高级用法解析
2016/06/28 Python
python中安装Scrapy模块依赖包汇总
2017/07/02 Python
python3利用smtplib通过qq邮箱发送邮件方法示例
2017/12/03 Python
python实现简单多人聊天室
2018/12/11 Python
解决Python 使用h5py加载文件,看不到keys()的问题
2019/02/08 Python
Django的性能优化实现解析
2019/07/30 Python
Python通过TensorFLow进行线性模型训练原理与实现方法详解
2020/01/15 Python
Python IDLE或shell中切换路径的操作
2020/03/09 Python
Tensorflow--取tensorf指定列的操作方式
2020/06/30 Python
html5.2 dialog简介详解
2018/02/27 HTML / CSS
2014年教师节国旗下讲话稿
2014/09/10 职场文书
党员批评与自我批评范文
2014/09/23 职场文书
八月一日观后感
2015/06/10 职场文书
创业计划书之面包店
2019/09/12 职场文书