推荐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 相关文章推荐
iframe 上下滚动条如何默认在下方实现原理
Dec 10 Javascript
JQuery实现绚丽的横向下拉菜单
Dec 19 Javascript
jquery ajax跨域解决方法(json方式)
Feb 04 Javascript
jQuery表单域选择器用法分析
Feb 10 Javascript
JS组件系列之Bootstrap Icon图标选择组件
Jan 28 Javascript
javascript js 操作数组 增删改查的简单实现
Jun 20 Javascript
webpack 2的react开发配置实例代码
Jul 28 Javascript
vue使用技巧及vue项目中遇到的问题
Jun 04 Javascript
vue异步axios获取的数据渲染到页面的方法
Aug 09 Javascript
微信小程序实现基于三元运算验证手机号/姓名功能示例
Jan 19 Javascript
layui 实现table翻页滚动条位置保持不变的例子
Sep 05 Javascript
vue实践---根据不同环境,自动转换请求的url地址操作
Sep 21 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
phpStudy访问速度慢和启动失败的解决办法
2015/11/19 PHP
php框架知识点的整理和补充
2021/03/01 PHP
经典的带阴影的可拖动的浮动层
2006/06/26 Javascript
Prototype PeriodicalExecuter对象 学习
2009/07/19 Javascript
jQuery下通过replace字符串替换实现大小图片切换
2012/05/22 Javascript
JavaScript定时器详解及实例
2013/08/01 Javascript
jquery实现带复选框的表格行选中删除时高亮显示
2013/08/01 Javascript
jquery图片轮播插件仿支付宝2013版全屏图片幻灯片
2014/04/03 Javascript
Javascript判断文件是否存在(客户端/服务器端)
2014/09/16 Javascript
js使用递归解析xml
2014/12/12 Javascript
js用拖动滑块来控制图片大小的方法
2015/02/27 Javascript
JavaScript+canvas实现七色板效果实例
2016/02/18 Javascript
JS传播事件、取消事件默认行为、阻止事件传播详解
2017/08/14 Javascript
js获取css的各种样式并且设置他们的方法
2017/08/22 Javascript
js实现动态改变radio状态的方法
2018/02/28 Javascript
详解Angular6.0使用路由步骤(共7步)
2018/06/29 Javascript
Express结合Webpack的全栈自动刷新
2019/05/23 Javascript
在layui中使用form表单监听ajax异步验证注册的实例
2019/09/03 Javascript
JavaScript实现PC端四格密码输入框功能
2020/02/19 Javascript
Vue项目配置跨域访问和代理proxy设置方式
2020/09/08 Javascript
通过实例解析jQ Ajax操作相关原理
2020/09/23 Javascript
Python中的包和模块实例
2014/11/22 Python
Python中绑定与未绑定的类方法用法分析
2016/04/29 Python
详解 Python 与文件对象共事的实例
2017/09/11 Python
python中字符串变二维数组的实例讲解
2018/04/03 Python
Python面向对象程序设计构造函数和析构函数用法分析
2019/04/12 Python
python 并发编程 非阻塞IO模型原理解析
2019/08/20 Python
Python小白不正确的使用类变量实例
2020/05/29 Python
阿迪达斯奥地利官方商城:adidas.at
2016/10/16 全球购物
运动会班级口号
2014/06/09 职场文书
关于感恩的演讲稿200字
2014/08/26 职场文书
会计试用期自我评价怎么写
2014/09/18 职场文书
党的群众路线教育实践活动剖析材料
2014/09/30 职场文书
2014年教研组工作总结
2014/11/26 职场文书
留学文书中的个人陈述,应该注意哪些问题?
2019/08/23 职场文书
Python中os模块的简单使用及重命名操作
2021/04/17 Python