<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
</head>
<body bgcolor="#ffffff" text="#000000">
Dear all,<br>
<br>
inspired by the jQuery support in OpenCms, I have implemented a new tag
for the opencms taglib, called cms:minify.<br>
<br>
The tag can automatically condense JavaScript and CSS code. The tag is
used by enclosing a block of CSS of JavaScript with it, for example:<br>
<blockquote><cms:minify type="js"><br>
function myFunc() {<br>
myVar = 123;<br>
alert( myVar );<br>
}<br>
</cms:jsminify></blockquote>
<p>The result in this case would be: "function myFunc(){a=123;alert(a)}"<br>
</p>
<p>The tag implementation together with instructions is available from:
<a class="moz-txt-link-freetext" href="http://www.berzinarchives.com/temp/opencms/cms-minify.1.0.zip">http://www.berzinarchives.com/temp/opencms/cms-minify.1.0.zip</a><br>
<br>
</p>
<b>@ALKACON</b>: I would very much like to see this code being added to
the
regular opencms distribution. The implementation is one single Java
class the
size and structure of which is very much comparable to other classes in
the opencms taglib. The code is documented and written to work with
Java 1.4. It's licensed under LGPL. The code uses the excellent YUI
compressor (BSD license) which has also been adopted by the jQuery
team. If you could rename the class and add it to a future version of
opencms, I then think this could give a boost to JavaScript development
with OpenCms. <br>
<br>
<br>
The tag is capable of detecting if it is in an offline project. In this
case, no compression will be done so that developers can still see
their code in full beauty at development time.<br>
<br>
I would appreciate feedback.<br>
<br>
Best Regards<br>
Christian<br>
</body>
</html>