推荐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 设计模式学习 Factory
Jul 29 Javascript
prettify 代码高亮着色器google出品
Dec 28 Javascript
JS+CSS实现电子商务网站导航模板效果代码
Sep 10 Javascript
jquery实现简单文字提示效果
Dec 02 Javascript
jQuery使用Selectator插件实现多选下拉列表过滤框(附源码下载)
Apr 08 Javascript
Jquery修改image的src属性,图片不加载问题的解决方法
May 17 Javascript
详解微信小程序 wx.uploadFile 的编码坑
Jan 23 Javascript
js实现文字跑马灯效果
Feb 23 Javascript
Angular2入门--架构总览
Mar 29 Javascript
深入浅析Vue中的 computed 和 watch
Jun 06 Javascript
Angular短信模板校验代码
Sep 23 Javascript
vue项目中js-cookie的使用存储token操作
Nov 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的FTP学习(四)
2006/10/09 PHP
在PHP中执行系统外部命令
2006/10/09 PHP
PHP中Date获取时间不正确怎么办
2008/06/05 PHP
PHP水印类,支持添加图片、文字、填充颜色区域的实现
2017/02/04 PHP
利用php-cli和任务计划实现刷新token功能的方法
2017/05/03 PHP
PHP基于IMAP收取邮件的方法示例
2017/08/07 PHP
Laravel框架中Blade模板的用法示例
2017/08/30 PHP
php使用pthreads v3多线程实现抓取新浪新闻信息操作示例
2020/02/21 PHP
如何通过PHP实现Des加密算法代码实例
2020/05/09 PHP
JS和Jquery获取和修改label的值的示例代码
2014/01/15 Javascript
jQuery对下拉框,单选框,多选框的操作
2014/02/21 Javascript
原生js实现类似弹窗抖动效果
2015/04/02 Javascript
浅谈JQuery+ajax+jsonp 跨域访问
2016/06/25 Javascript
原生JS下拉加载插件分享
2016/12/26 Javascript
Reactjs实现通用分页组件的实例代码
2017/01/19 Javascript
jquery实现自适应banner焦点图
2017/02/16 Javascript
详解Layer弹出层样式
2017/08/21 Javascript
vue和webpack项目构建过程常用的npm命令详解
2018/06/15 Javascript
JavaScript中交换值的10种方法总结
2020/08/18 Javascript
Python中使用HTMLParser解析html实例
2015/02/08 Python
MySQL最常见的操作语句小结
2015/05/07 Python
浅谈pycharm下找不到sqlalchemy的问题
2018/12/03 Python
python爬虫之自制英汉字典
2019/06/24 Python
在django中使用post方法时,需要增加csrftoken的例子
2020/03/13 Python
python3 使用openpyxl将mysql数据写入xlsx的操作
2020/05/15 Python
详解Pycharm与anaconda安装配置指南
2020/08/25 Python
matplotlib之多边形选区(PolygonSelector)的使用
2021/02/24 Python
美国领先的精品家居照明和装饰产品在线零售商:LightsOnline.com
2018/01/23 全球购物
Currentbody美国/加拿大:美容仪专家
2020/03/09 全球购物
结构和类有什么异同
2012/07/16 面试题
大学生2014全国两会学习心得体会
2014/03/10 职场文书
2014植树节活动总结
2014/03/11 职场文书
初中班主任寄语
2014/04/04 职场文书
想要创业,那么你做好准备了吗?
2019/07/01 职场文书
Java数据结构之链表相关知识总结
2021/06/18 Java/Android
MySQL如何解决幻读问题
2021/08/07 MySQL