推荐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 相关文章推荐
云网广告中的代码,提示出错,大家找找
Nov 21 Javascript
基于jQuery的简单的列表导航菜单
Mar 02 Javascript
jqPlot 图表中文API使用文档及源码和在线示例
Feb 07 Javascript
Jquery Ajax解析XML数据(同步及异步调用)简单实例
Feb 12 Javascript
Jquery 获取指定标签的对象及属性的设置与移除
May 29 Javascript
微信小程序 框架详解及实例应用
Sep 26 Javascript
jsp 网站引入外部css或者js失效问题解决
Oct 31 Javascript
jQuery如何跳转到另一个网页 就这么简单
Dec 28 Javascript
详解Angular2中Input和Output用法及示例
May 21 Javascript
vue+vuex+json-seiver实现数据展示+分页功能
Apr 11 Javascript
详解Vue 数据更新了但页面没有更新的 7 种情况汇总及延伸总结
May 28 Javascript
js面向对象方式实现拖拽效果
Mar 03 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
FCKeditor添加自定义按钮
2008/03/27 PHP
PHP批量检测并去除文件BOM头代码实例
2014/05/08 PHP
浅析php-fpm静态和动态执行方式的比较
2016/11/09 PHP
php常用正则函数实例小结
2016/12/29 PHP
php注册系统和使用Xajax即时验证用户名是否被占用
2017/08/31 PHP
Javascript中暂停功能的实现代码
2007/03/04 Javascript
原生JavaScript+LESS实现瀑布流
2014/12/12 Javascript
Javascript中3个需要注意的运算符
2015/04/02 Javascript
Java Mybatis框架入门基础教程
2015/09/21 Javascript
vue,angular,avalon这三种MVVM框架优缺点
2016/04/27 Javascript
JQuery组件基于Bootstrap的DropDownList(完整版)
2016/07/05 Javascript
JavaScript实现省市县三级级联特效
2017/05/16 Javascript
浅谈Vue.js 1.x 和 2.x 实例的生命周期
2017/07/25 Javascript
vue.js给动态绑定的radio列表做批量编辑的方法
2018/02/28 Javascript
详解JavaScript修改注册表的方法
2020/01/05 Javascript
Vue-router编程式导航的两种实现代码
2021/03/04 Vue.js
python读取Android permission文件
2013/11/01 Python
python处理二进制数据的方法
2015/06/03 Python
Python实现提取谷歌音乐搜索结果的方法
2015/07/10 Python
深入浅析Python字符编码
2015/11/12 Python
从0开始的Python学习014面向对象编程(推荐)
2019/04/02 Python
Tensorflow使用Anaconda、pycharm安装记录
2020/07/29 Python
Brasty波兰:香水、化妆品、手表网上商店
2019/04/15 全球购物
解决python 输出到csv 出现多空行的情况
2021/03/24 Python
高中班长自我鉴定
2013/12/20 职场文书
关于爱情的广播稿
2014/01/16 职场文书
员工考核管理制度
2014/02/02 职场文书
护士岗位职责
2014/02/16 职场文书
一句话工作感言
2014/03/01 职场文书
门面房租房协议书
2014/08/20 职场文书
办公室主任个人总结
2015/02/28 职场文书
前台岗位职责范本
2015/04/16 职场文书
无犯罪记录证明样本
2015/06/16 职场文书
导游词之南昌滕王阁
2019/11/29 职场文书
MongoDB balancer的使用详解
2021/04/30 MongoDB
java版 联机五子棋游戏
2022/05/04 Java/Android