推荐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 相关文章推荐
Document对象内容集合(比较全)
Sep 06 Javascript
javascript学习笔记(三)显示当时时间的代码
Apr 08 Javascript
jquery jqPlot API 中文使用教程(非常强大的图表工具)
Aug 15 Javascript
优化Jquery,提升网页加载速度
Nov 14 Javascript
使用vue.js制作分页组件
Jun 27 Javascript
jQueryUI Datepicker组件设置日期高亮
Oct 13 Javascript
bootstrap table 表格中增加下拉菜单末行出现滚动条的快速解决方法
Jan 05 Javascript
EasyUI框架 使用Ajax提交注册信息的实现代码
Sep 27 Javascript
使用vuepress搭建静态博客的示例代码
Feb 14 Javascript
通过实例了解JS执行上下文运行原理
Jun 17 Javascript
Vue生命周期activated之返回上一页不重新请求数据操作
Jul 26 Javascript
原生js实现分页效果
Sep 23 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
与数据库连接
2006/10/09 PHP
深入理解PHP之数组(遍历顺序)  Laruence原创
2012/06/13 PHP
PHP大小写问题:函数名和类名不区分,变量名区分
2013/06/17 PHP
PHP获取和操作配置文件php.ini的几个函数介绍
2013/06/24 PHP
Windows中使用计划任务自动执行PHP程序实例
2014/05/09 PHP
46 个非常有用的 PHP 代码片段
2016/02/16 PHP
一份老外写的XMLHttpRequest代码多浏览器支持兼容性
2007/01/11 Javascript
Jquery Validation插件防止重复提交表单的解决方法
2010/03/05 Javascript
JS中如何判断传过来的JSON数据中是否存在某字段
2014/08/18 Javascript
采用自执行的匿名函数解决for循环使用闭包的问题
2014/09/11 Javascript
jQuery中queue()方法用法实例
2014/12/29 Javascript
javascript实现实时输出当前的时间
2015/04/27 Javascript
js+html5获取用户地理位置信息并在Google地图上显示的方法
2015/06/05 Javascript
js实现Form栏显示全格式时间时钟效果代码
2015/08/19 Javascript
Bootstrap实现弹性搜索框
2016/07/11 Javascript
vue watch深度监听对象实现数据联动效果
2018/08/16 Javascript
浅谈Vue.js 关于页面加载完成后执行一个方法的问题
2019/04/01 Javascript
Vue.js中的组件系统
2019/05/30 Javascript
jquery实现鼠标悬浮弹出气泡提示框
2020/12/23 jQuery
vue 使用饿了么UI仿写teambition的筛选功能
2021/03/01 Vue.js
python BeautifulSoup使用方法详解
2013/11/21 Python
Python的Bottle框架中获取制定cookie的教程
2015/04/24 Python
13个最常用的Python深度学习库介绍
2017/10/28 Python
Django中使用MySQL5.5的教程
2019/12/18 Python
Python hashlib模块的使用示例
2020/10/09 Python
Python classmethod装饰器原理及用法解析
2020/10/17 Python
毕业生的自我评价
2013/12/30 职场文书
雪山饭庄的创业计划书范文
2014/01/18 职场文书
家长对小学生的评语
2014/01/28 职场文书
小学生美德少年事迹
2014/02/02 职场文书
小学学雷锋活动总结
2014/04/25 职场文书
食品安全承诺书
2014/05/22 职场文书
服务理念标语
2014/06/18 职场文书
2014年党员发展工作总结
2014/12/02 职场文书
研究生简历自我评
2015/03/11 职场文书
2019幼儿园感恩节活动策划书
2019/11/28 职场文书