<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: YUI Compressor Version 2.1 Now Available</title>
	<atom:link href="http://www.julienlecomte.net/blog/2007/08/15/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.julienlecomte.net/blog/2007/08/15/</link>
	<description>Web Development, Operating System Programming and Amateur Astronomy</description>
	<lastBuildDate>Sat, 10 Jul 2010 05:57:06 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Julien Lecomte</title>
		<link>http://www.julienlecomte.net/blog/2007/08/15/comment-page-1/#comment-784</link>
		<dc:creator>Julien Lecomte</dc:creator>
		<pubDate>Fri, 07 Dec 2007 23:23:06 +0000</pubDate>
		<guid isPermaLink="false">http://www.julienlecomte.net/blog/2007/08/29/yui-compressor-version-21-now-available/#comment-784</guid>
		<description>@Kezzel

Each module should export a set of global symbols. Simply omit the &#039;var&#039; keyword in front of them, and they won&#039;t obfuscated.

Hope this helps,
Julien</description>
		<content:encoded><![CDATA[<p>@Kezzel</p>
<p>Each module should export a set of global symbols. Simply omit the &#8216;var&#8217; keyword in front of them, and they won&#8217;t obfuscated.</p>
<p>Hope this helps,<br />
Julien</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kezzel</title>
		<link>http://www.julienlecomte.net/blog/2007/08/15/comment-page-1/#comment-782</link>
		<dc:creator>Kezzel</dc:creator>
		<pubDate>Fri, 07 Dec 2007 15:02:11 +0000</pubDate>
		<guid isPermaLink="false">http://www.julienlecomte.net/blog/2007/08/29/yui-compressor-version-21-now-available/#comment-782</guid>
		<description>Hi Julien

I&#039;m building a website framework using js-compressors, and have come accross a problem that I can not find an answer for anywhere else. It seems like you are close to the guru in this area and thus I turn my hope for an answer to you.

The goal of the framework is to allow modules to be loaded on the fly, either in the background after the initial load has been done, or when the user requests an action/functionality that has not yet been used. When compressing I hide all unnecessary names by enclosing the total script in an anonymous function. This however obfuscates the names in the base js and the modules in different environments and thus they cannot use eachother. My question is thus if it is possible with the current compressors to set a starting obfuscation table of name=&gt;obfuscated_name when compressing a new file and thus compress it like it was compressed in that environment? Using this approach compressed modules could be run inside the compressed environment by using eval.

Best regards
Kezzel</description>
		<content:encoded><![CDATA[<p>Hi Julien</p>
<p>I&#8217;m building a website framework using js-compressors, and have come accross a problem that I can not find an answer for anywhere else. It seems like you are close to the guru in this area and thus I turn my hope for an answer to you.</p>
<p>The goal of the framework is to allow modules to be loaded on the fly, either in the background after the initial load has been done, or when the user requests an action/functionality that has not yet been used. When compressing I hide all unnecessary names by enclosing the total script in an anonymous function. This however obfuscates the names in the base js and the modules in different environments and thus they cannot use eachother. My question is thus if it is possible with the current compressors to set a starting obfuscation table of name=&gt;obfuscated_name when compressing a new file and thus compress it like it was compressed in that environment? Using this approach compressed modules could be run inside the compressed environment by using eval.</p>
<p>Best regards<br />
Kezzel</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Julien Lecomte</title>
		<link>http://www.julienlecomte.net/blog/2007/08/15/comment-page-1/#comment-440</link>
		<dc:creator>Julien Lecomte</dc:creator>
		<pubDate>Tue, 02 Oct 2007 20:23:58 +0000</pubDate>
		<guid isPermaLink="false">http://www.julienlecomte.net/blog/2007/08/29/yui-compressor-version-21-now-available/#comment-440</guid>
		<description>@The Doctor What

You should use JSLint. The YUI Compressor is in no way a replacement for JSLint.

http://www.jslint.com/

Regards</description>
		<content:encoded><![CDATA[<p>@The Doctor What</p>
<p>You should use JSLint. The YUI Compressor is in no way a replacement for JSLint.</p>
<p><a href="http://www.jslint.com/" rel="nofollow">http://www.jslint.com/</a></p>
<p>Regards</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: The Doctor What</title>
		<link>http://www.julienlecomte.net/blog/2007/08/15/comment-page-1/#comment-194</link>
		<dc:creator>The Doctor What</dc:creator>
		<pubDate>Tue, 11 Sep 2007 16:43:17 +0000</pubDate>
		<guid isPermaLink="false">http://www.julienlecomte.net/blog/2007/08/29/yui-compressor-version-21-now-available/#comment-194</guid>
		<description>Oh, okay.  That makes sense.  Obviously, knowing what variable names it can and cannot use would be better.  Meanwhile, can you clean up the warning to say something like your message above?

Can&#039;t you just have a function to generate the identifiers for you? Something like (in JavaScript, because I don&#039;t do enough Java to be confortable):


var idengen = function () {
    if (typeof (idengen.list) === &#039;undefined&#039;) {
        idengen.init();
    }
    var count = 0;
    var next = this.gen();
    while (count 

Then if you find an undefined global variable, then just call &lt;code&gt;idengen.seen(globalvar);&lt;/code&gt;.

Now that I think about it, it would be helpful to track all undifined global variables and then return them optionally with a command line param.

Ciao!</description>
		<content:encoded><![CDATA[<p>Oh, okay.  That makes sense.  Obviously, knowing what variable names it can and cannot use would be better.  Meanwhile, can you clean up the warning to say something like your message above?</p>
<p>Can&#8217;t you just have a function to generate the identifiers for you? Something like (in JavaScript, because I don&#8217;t do enough Java to be confortable):</p>
<p>var idengen = function () {<br />
    if (typeof (idengen.list) === &#8216;undefined&#8217;) {<br />
        idengen.init();<br />
    }<br />
    var count = 0;<br />
    var next = this.gen();<br />
    while (count </p>
<p>Then if you find an undefined global variable, then just call <code>idengen.seen(globalvar);</code>.</p>
<p>Now that I think about it, it would be helpful to track all undifined global variables and then return them optionally with a command line param.</p>
<p>Ciao!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Julien Lecomte</title>
		<link>http://www.julienlecomte.net/blog/2007/08/15/comment-page-1/#comment-188</link>
		<dc:creator>Julien Lecomte</dc:creator>
		<pubDate>Mon, 10 Sep 2007 15:01:37 +0000</pubDate>
		<guid isPermaLink="false">http://www.julienlecomte.net/blog/2007/08/29/yui-compressor-version-21-now-available/#comment-188</guid>
		<description>@The Doctor What

Since all local variables are going to be renamed to a 1 (or 2, or 3) letter symbol, it tries to spot undeclared globals that are less then 3 letters in length (which is the case for &quot;viv&quot;) to avoid naming conflicts, and shows a warning. It does not care about undeclared globals that are 4 letters long or more (which is the case for &quot;YAHOO&quot;) 

I am planning to make some improvements in that area.

Regards</description>
		<content:encoded><![CDATA[<p>@The Doctor What</p>
<p>Since all local variables are going to be renamed to a 1 (or 2, or 3) letter symbol, it tries to spot undeclared globals that are less then 3 letters in length (which is the case for &#8220;viv&#8221;) to avoid naming conflicts, and shows a warning. It does not care about undeclared globals that are 4 letters long or more (which is the case for &#8220;YAHOO&#8221;) </p>
<p>I am planning to make some improvements in that area.</p>
<p>Regards</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: The Doctor What</title>
		<link>http://www.julienlecomte.net/blog/2007/08/15/comment-page-1/#comment-187</link>
		<dc:creator>The Doctor What</dc:creator>
		<pubDate>Mon, 10 Sep 2007 14:55:12 +0000</pubDate>
		<guid isPermaLink="false">http://www.julienlecomte.net/blog/2007/08/29/yui-compressor-version-21-now-available/#comment-187</guid>
		<description>Create a file called test.js with the following contents:

/*extern YAHOO, viv */
/*jslint undef: false, nomen: true, evil: false, undef: true, browser:
true, white: true */

(function () {
    viv.example = function () {
    };

    viv.example();

    YAHOO.example = function () {
    };

    YAHOO.example();
})();


Then execute yuicompressor like so and notice the WARNING.

$  bin/yuicompressor --charset utf-8 --warn test.js

[WARNING] Found an undeclared symbol: viv
(function (){viv ---&gt; . 

This is strange.  It didn&#039;t complain about YAHOO, but complained about
viv.  It&#039;s almost as if someone added YAHOO to an exception list... ^_^

It should either complain about both or neither.

Alternatively, it could honor jslint&#039;s extern declaration, which I&#039;d
like even better.

Ciao!</description>
		<content:encoded><![CDATA[<p>Create a file called test.js with the following contents:</p>
<p>/*extern YAHOO, viv */<br />
/*jslint undef: false, nomen: true, evil: false, undef: true, browser:<br />
true, white: true */</p>
<p>(function () {<br />
    viv.example = function () {<br />
    };</p>
<p>    viv.example();</p>
<p>    YAHOO.example = function () {<br />
    };</p>
<p>    YAHOO.example();<br />
})();</p>
<p>Then execute yuicompressor like so and notice the WARNING.</p>
<p>$  bin/yuicompressor &#8211;charset utf-8 &#8211;warn test.js</p>
<p>[WARNING] Found an undeclared symbol: viv<br />
(function (){viv &#8212;&gt; . </p>
<p>This is strange.  It didn&#8217;t complain about YAHOO, but complained about<br />
viv.  It&#8217;s almost as if someone added YAHOO to an exception list&#8230; ^_^</p>
<p>It should either complain about both or neither.</p>
<p>Alternatively, it could honor jslint&#8217;s extern declaration, which I&#8217;d<br />
like even better.</p>
<p>Ciao!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jorge De Castro</title>
		<link>http://www.julienlecomte.net/blog/2007/08/15/comment-page-1/#comment-178</link>
		<dc:creator>Jorge De Castro</dc:creator>
		<pubDate>Sat, 08 Sep 2007 09:21:55 +0000</pubDate>
		<guid isPermaLink="false">http://www.julienlecomte.net/blog/2007/08/29/yui-compressor-version-21-now-available/#comment-178</guid>
		<description>@Jason Collins
I posted an Maven/Ant &lt;a href=&quot;http://jorgetown.blogspot.com/2007/06/rhino-maven-automagic-compression.html&quot; rel=&quot;nofollow&quot;&gt;automated compression example using rhino&lt;/a&gt; I implemented some time ago. It included optional conditional compression (compress only if files changed) and namespace &quot;shrinkage&quot; (as mentioned by Fredrik above).
I believe the YUI compressor + Maven plugin are the way to go, though.
Great work, guys!</description>
		<content:encoded><![CDATA[<p>@Jason Collins<br />
I posted an Maven/Ant <a href="http://jorgetown.blogspot.com/2007/06/rhino-maven-automagic-compression.html" rel="nofollow">automated compression example using rhino</a> I implemented some time ago. It included optional conditional compression (compress only if files changed) and namespace &#8220;shrinkage&#8221; (as mentioned by Fredrik above).<br />
I believe the YUI compressor + Maven plugin are the way to go, though.<br />
Great work, guys!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: chris holland</title>
		<link>http://www.julienlecomte.net/blog/2007/08/15/comment-page-1/#comment-171</link>
		<dc:creator>chris holland</dc:creator>
		<pubDate>Sat, 01 Sep 2007 10:29:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.julienlecomte.net/blog/2007/08/29/yui-compressor-version-21-now-available/#comment-171</guid>
		<description>Merci pour ce composant genial, je ne l&#039;ai pas encore integre&#039; dans mon projet, mais ca ne saurait tarder, il me suffira juste de remplacer shrinksafe. Pour que ca marche pour moi il me faudra acceder a l&#039;API Java, je suppose que javaScriptCompressorInstance.compress devrait faire l&#039;affaire.</description>
		<content:encoded><![CDATA[<p>Merci pour ce composant genial, je ne l&#8217;ai pas encore integre&#8217; dans mon projet, mais ca ne saurait tarder, il me suffira juste de remplacer shrinksafe. Pour que ca marche pour moi il me faudra acceder a l&#8217;API Java, je suppose que javaScriptCompressorInstance.compress devrait faire l&#8217;affaire.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Daniel GalÃ¡n y Martins</title>
		<link>http://www.julienlecomte.net/blog/2007/08/15/comment-page-1/#comment-170</link>
		<dc:creator>Daniel GalÃ¡n y Martins</dc:creator>
		<pubDate>Fri, 31 Aug 2007 22:36:37 +0000</pubDate>
		<guid isPermaLink="false">http://www.julienlecomte.net/blog/2007/08/29/yui-compressor-version-21-now-available/#comment-170</guid>
		<description>Hi,

pack:tag 2.4 has been released. It supports the YUI Compressor and the CSS Compressor. Check the website at:
http://sf.net/projects/packtag

Great compressors, keep up the good work.</description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>pack:tag 2.4 has been released. It supports the YUI Compressor and the CSS Compressor. Check the website at:<br />
<a href="http://sf.net/projects/packtag" rel="nofollow">http://sf.net/projects/packtag</a></p>
<p>Great compressors, keep up the good work.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Julien Lecomte</title>
		<link>http://www.julienlecomte.net/blog/2007/08/15/comment-page-1/#comment-169</link>
		<dc:creator>Julien Lecomte</dc:creator>
		<pubDate>Fri, 31 Aug 2007 21:34:47 +0000</pubDate>
		<guid isPermaLink="false">http://www.julienlecomte.net/blog/2007/08/29/yui-compressor-version-21-now-available/#comment-169</guid>
		<description>@Jason

Keep watching this blog. You will get your answer in an upcoming article to be published within the next 2 weeks.</description>
		<content:encoded><![CDATA[<p>@Jason</p>
<p>Keep watching this blog. You will get your answer in an upcoming article to be published within the next 2 weeks.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
