推荐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 相关文章推荐
禁止刷新,回退的JS
Nov 25 Javascript
JavaScript 学习 - 提高篇
Feb 02 Javascript
用js实现小球的自由移动代码
Apr 22 Javascript
JS修改css样式style浅谈
May 06 Javascript
子页向父页传值示例
Nov 27 Javascript
jQuery可见性过滤器:hidden和:visibility用法实例
Jun 24 Javascript
JS如何生成一个不重复的ID的函数
Dec 25 Javascript
如何使用vuejs实现更好的Form validation?
Apr 07 Javascript
基于JavaScript实现数码时钟效果
Mar 30 Javascript
JS实现的加减乘除四则运算计算器示例
Aug 09 Javascript
详解JS转换数值函数Number()、parseInt()、parseFloat()
Aug 24 Javascript
vue实现弹幕功能
Oct 25 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 和 MySQL 基础教程(四)
2006/10/09 PHP
PHP入门教程之面向对象的特性分析(继承,多态,接口,抽象类,抽象方法等)
2016/09/11 PHP
PHP7新特性之抽象语法树(AST)带来的变化详解
2018/07/17 PHP
php报错502badgateway解决方法
2019/10/11 PHP
jQuery的.live()和.die() 使用介绍
2011/09/10 Javascript
js里怎么取select标签里的值并修改
2012/12/10 Javascript
Jquery模仿Baidu、Google搜索时自动补充搜索结果提示
2013/12/26 Javascript
jQuery Validate初步体验(一)
2015/12/12 Javascript
angular ng-repeat数组中的数组实例
2017/02/18 Javascript
Angularjs为ng-click事件传递参数
2017/06/15 Javascript
一文让你彻底搞清楚javascript中的require、import与export
2017/09/24 Javascript
响应式框架Bootstrap栅格系统的实例
2017/12/19 Javascript
浅谈Three.js截图并下载的大坑
2019/11/01 Javascript
JS实现拼图游戏
2021/01/29 Javascript
浅谈Python 中整型对象的存储问题
2016/05/16 Python
详解Python的Twisted框架中reactor事件管理器的用法
2016/05/25 Python
Python列表list内建函数用法实例分析【insert、remove、index、pop等】
2017/07/24 Python
python实现八大排序算法(2)
2017/09/14 Python
Django开发的简易留言板案例详解
2018/12/04 Python
windows下 兼容Python2和Python3的解决方法
2018/12/05 Python
python点击鼠标获取坐标(Graphics)
2019/08/10 Python
python 接口实现 供第三方调用的例子
2019/08/13 Python
python3 求约数的实例
2019/12/05 Python
TensorFlow实现指数衰减学习率的方法
2020/02/05 Python
python中sort sorted reverse reversed函数的区别说明
2020/05/11 Python
美国儿童运动鞋和服装零售商:Kids Foot Locker
2017/08/05 全球购物
介绍下Java中==和equals的区别
2013/09/01 面试题
运动会100米解说词
2014/01/23 职场文书
公司应聘自荐书
2014/06/14 职场文书
化学教育专业求职信
2014/07/08 职场文书
水电维修专业推荐信
2014/09/06 职场文书
个人思想政治总结
2015/03/05 职场文书
Python提取PDF指定内容并生成新文件
2021/06/09 Python
SQL Server代理:理解SQL代理错误日志处理方法
2021/06/30 SQL Server
PHP面试题 wakeup魔法 Ezpop pop序列化与反序列化
2022/04/11 PHP
Android基础入门之dataBinding的简单使用教程
2022/06/21 Java/Android