Insufficient documentation for compress:js
Closed this issue · 2 comments
GoogleCodeExporter commented
There is insufficient documentation for compress:js. I'm trying to determine
if it will meet the needs of my project.
The most detailed mention of compress:js that I can find within this project is
as follows:
<compress:js enabled="true" yuiJsLineBreak="80"
yuiJsPreserveAllSemiColons="true"></compress:js>
But how do I specify source files? Can I specify multiple source files? Or
does it (only) work with inline Javascript?
I am impressed with how active this project is but until I get answers to the
above questions I cannot use it in my work. On the other hand, for the time
being I am using another project, though it is much less active than yours.
And this is the documented interface for compressing multiple js files:
<pack:script>
<src>/js/myJavaScriptFile.js</src>
<src>/js/mySecondJavaScriptFile.js</src>
</pack:script>
This is more or less the type of interface within the JSP that I'd like to be
able to use. Problem is, this other project does not rely on YuiCompressor,
and therefore fails on some regular expression literals.
So I'd much prefer to use htmlcompressor since it relies on yuicompressor. But
first I need to better understand if/how to combine multiple javascript files
from within the JSP. And I think any explanation you can provide me, might be
good documentation for your home page as well.
Thanks!!
Original issue reported on code.google.com by jemptyme...@gmail.com
on 18 Mar 2011 at 3:00
GoogleCodeExporter commented
<compress:js> can be used only for inline javascript (it sends enclosed content
directly to yui compressor bypassing html compressor, making it a bit faster):
<script>
<compress:js>
alert("hello"); //comment will be removed
</compress:js>
</script>
There are probably other tools for combining js files, I don't think I should
include it into the project...
Original comment by serg472@gmail.com
on 18 Mar 2011 at 6:58
GoogleCodeExporter commented
Original comment by serg472@gmail.com
on 26 Mar 2011 at 8:14
- Changed state: Done