你如何为你的Java Web应用程序的JavaScript自动缩小? [英] How do you automate Javascript minification for your Java web applications?
问题描述
我感兴趣的是你如何听preFER为您的Java Web应用自动化的Javascript缩小。这里有几个方面,我特别感兴趣的:
I'm interested in hearing how you prefer to automate Javascript minification for your Java web apps. Here are a few aspects I'm particularly interested in:
- 如何做它的集成?这是你的构建工具,Servlet过滤器,一个独立的程序处理后的WAR文件,或者其他什么东西? 的一部分
- 这是轻松启用和禁用?这是非常无趣尝试和调试脚本缩小的,但它也有用开发人员能够测试该微小不会破坏任何东西。
- 是否(从微小固有的那些除外),我有我的一天到一天的工作,要考虑工作的透明后,还是有什么副作用?
- 哪些minifier 它用?
- 它是否没有任何特点,你能想到的?
- 你喜欢什么呢?
- 什么的不的你喜欢吗?
- How does it integrate? Is it part of your build tool, a servlet filter, a standalone program post-processing the WAR file, or something else?
- Is it easy to enable and disable? It's very unfunny to try and debug a minified script, but it's also useful for a developer to be able to test that the minification doesn't break anything.
- Does it work transparently, or does it have any side effects (apart from the ones inherent in minification) that I have to consider in my day-to-day work?
- Which minifier does it use?
- Does it lack any features that you can think of?
- What do you like about it?
- What don't you like about it?
这将主要作为一个参考我的未来项目(并希望其他SOER的会发现它内容丰富,太),所以各种工具也很有趣。
This will mostly serve as a reference for my future projects (and hopefully other SOer's will find it informative, too), so all kinds of tools are interesting.
(请注意,这不是一个问题,哪个minifier最好即可。我们有很多周围的人已经。)
(Note that this is not a question about which minifier is best. We have plenty of those around already.)
推荐答案
如果您发布新的东西在这个线程,编辑这篇文章链接到你的。
Round-up post
If you post something new in this thread, edit this post to link to yours.
- Ant
(使用YUI的COM pressor)适用
任务 - 定制YUI的COM pressor Ant任务
- Maven YUI的COM pressor插件
- 颗粒(对JSP,JSF,Grails的,蚂蚁)
- 为谷歌关闭编译器的Ant宏
- wro4j(Maven的,Servlet过滤器,普通Java等)
- 蚂蚁锐-COM pressor(为COM pressing JS + CSS Ant任务)
- JAWR
- 缩减大小Maven插件
- 积重难返
- Ant
apply
task (using YUI Compressor) - Custom YUI Compressor Ant task
- Maven YUI Compressor plugin
- Granule (for JSP, JSF, Grails, Ant)
- Ant macros for Google Closure compiler
- wro4j (Maven, servlet filters, plain Java, etc)
- ant-yui-compressor (ant task for compressing JS+CSS)
- JAWR
- Minify Maven Plugin
- humpty
这篇关于你如何为你的Java Web应用程序的JavaScript自动缩小?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!