推荐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获取form表单值的代码
Jul 17 Javascript
JavaScript中json对象和string对象之间相互转化
Dec 26 Javascript
jQuery的slideToggle方法实例
May 07 Javascript
js倒计时简单实现方法
Dec 17 Javascript
js实现简单的验证码
Dec 25 Javascript
Easyui 之 Treegrid 笔记
Apr 29 Javascript
基于jQuery实现弹出可关闭遮罩提示框实例代码
Jul 18 Javascript
深入理解vuex2.0 之 modules
Nov 20 Javascript
jQuery实现弹窗下底部页面禁止滑动效果
Dec 19 jQuery
JS闭包经典实例详解
Dec 20 Javascript
微信小程序select下拉框实现效果
May 15 Javascript
createObjectURL方法实现本地图片预览
Sep 30 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
用Flash图形化数据(二)
2006/10/09 PHP
php封装的表单验证类完整实例
2016/10/19 PHP
yii2使用GridView实现数据全选及批量删除按钮示例
2017/03/01 PHP
PHP实现获取第一个中文首字母并进行排序的方法
2017/05/09 PHP
php数值计算num类简单操作示例
2020/05/15 PHP
javascript开发随笔二 动态加载js和文件
2011/11/25 Javascript
javascript动画对象支持加速、减速、缓入、缓出的实现代码
2012/09/30 Javascript
JS控件的生命周期介绍
2012/10/22 Javascript
JQuery实现超链接鼠标提示效果的方法
2015/06/10 Javascript
jQuery.each使用详解
2015/07/07 Javascript
利用Js+Css实现折纸动态导航效果实例源码
2017/01/25 Javascript
深入理解Vue-cli搭建项目后的目录结构探秘
2017/07/13 Javascript
利用js给datalist或select动态添加option选项的方法
2018/01/25 Javascript
nuxt框架中路由鉴权之Koa和Session的用法
2018/05/09 Javascript
JavaScript指定断点操作实例教程
2018/09/18 Javascript
详解vue文件中使用echarts.js的两种方式
2018/10/18 Javascript
原来JS还可以这样拆箱转换详解
2019/02/01 Javascript
利用JS如何获取form表单数据
2019/12/19 Javascript
JS面向对象编程基础篇(三) 继承操作实例详解
2020/03/03 Javascript
[47:48]DOTA2上海特级锦标赛D组小组赛#2 Liquid VS VP第三局
2016/02/28 DOTA
Python利用QQ邮箱发送邮件的实现方法(分享)
2017/06/09 Python
python 实现矩阵填充0的例子
2019/11/29 Python
python三引号如何输入
2020/07/06 Python
Python unittest discover批量执行代码实例
2020/09/08 Python
python mock测试的示例
2020/10/19 Python
详解css3 object-fit属性
2018/07/27 HTML / CSS
HTML5实现自带进度条和滑块滑杆效果
2018/04/17 HTML / CSS
JENNIFER BEHR官网:各种耳环和发饰
2020/06/07 全球购物
结婚通知短信大全
2015/04/17 职场文书
普通员工辞职信范文
2015/05/12 职场文书
庆祝教师节新闻稿
2015/07/17 职场文书
2019年入党思想汇报格式与要求
2019/06/25 职场文书
html+css实现分层金字塔的实例
2021/06/02 HTML / CSS
python批量创建变量并赋值操作
2021/06/03 Python
golang中字符串MD5生成方式总结
2021/07/04 Golang
Nginx 反向代理解决跨域问题多种情况分析
2022/01/18 Servers