<?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: Using Phing to automate JavaScript and CSS Minimization</title>
	<atom:link href="http://www.zachleat.com/web/using-phing-to-automate-javascript-and-css-minimization/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.zachleat.com/web/using-phing-to-automate-javascript-and-css-minimization/</link>
	<description></description>
	<lastBuildDate>Wed, 16 May 2012 21:15:15 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
	<item>
		<title>By: iVariable</title>
		<link>http://www.zachleat.com/web/using-phing-to-automate-javascript-and-css-minimization/comment-page-1/#comment-2403</link>
		<dc:creator>iVariable</dc:creator>
		<pubDate>Thu, 23 Jun 2011 05:25:07 +0000</pubDate>
		<guid isPermaLink="false">http://www.zachleat.com/web/2007/08/11/using-phing-to-automate-javascript-and-css-minimization/#comment-2403</guid>
		<description>Thanks a lot! You&#039;ve saved me some time ^_^</description>
		<content:encoded><![CDATA[<p>Thanks a lot! You&#8217;ve saved me some time ^_^</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tristan Eastburn</title>
		<link>http://www.zachleat.com/web/using-phing-to-automate-javascript-and-css-minimization/comment-page-1/#comment-1908</link>
		<dc:creator>Tristan Eastburn</dc:creator>
		<pubDate>Fri, 05 Mar 2010 00:28:32 +0000</pubDate>
		<guid isPermaLink="false">http://www.zachleat.com/web/2007/08/11/using-phing-to-automate-javascript-and-css-minimization/#comment-1908</guid>
		<description>OK I spoke a little soon :)

Line 216 (preserveCss) also need the fix from the above comment.

Also, properties with number values, i.e. lines 199, 203 and 209 (optimizeShortand, propertyCase and mergeSelectors) need to be changed from:
if(!empty($this-&gt;propertyName))

to:
if(isset($this-&gt;propertyName))

since they all have number values, empty() will fail for their 0 value.</description>
		<content:encoded><![CDATA[<p>OK I spoke a little soon :)</p>
<p>Line 216 (preserveCss) also need the fix from the above comment.</p>
<p>Also, properties with number values, i.e. lines 199, 203 and 209 (optimizeShortand, propertyCase and mergeSelectors) need to be changed from:<br />
if(!empty($this-&gt;propertyName))</p>
<p>to:<br />
if(isset($this-&gt;propertyName))</p>
<p>since they all have number values, empty() will fail for their 0 value.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tristan Eastburn</title>
		<link>http://www.zachleat.com/web/using-phing-to-automate-javascript-and-css-minimization/comment-page-1/#comment-1907</link>
		<dc:creator>Tristan Eastburn</dc:creator>
		<pubDate>Thu, 04 Mar 2010 23:29:22 +0000</pubDate>
		<guid isPermaLink="false">http://www.zachleat.com/web/2007/08/11/using-phing-to-automate-javascript-and-css-minimization/#comment-1907</guid>
		<description>Thanks a lot for these filters! They work quite well so far and saved me a lot of time.

I know you wrote this article 2.5 years ago, but I ran across a tiny bug with in the CssTidyFilter where the &quot;remove_last_;&quot; property doesn&#039;t get set properly, though. The bug appears for me with Phing 2.4.0 and CssTidy 1.3 on Ubuntu 9.10 Karmic, haven&#039;t tested other versions.

My build file has this line:
$lt;param name=&quot;remove_last_;&quot; value=&quot;true&quot;/&gt;

And putting an echo in CssTidyFilter after calling getParam() shows that somewhere along the way it gets changed:
var_dump($this-&gt;removeLastSemicolon) = string(1) &quot;1&quot;

So the following assignment fails:
$css-&gt;set_cfg(&#039;remove_last_;&#039;,$this-&gt;removeLastSemicolon==&#039;true&#039;?true:false);

I will send a patch to the author, but in case he can&#039;t get to it or no longer maintains this project, you can just do this (around line 202):
$css-&gt;set_cfg(&#039;remove_last_;&#039;,!empty($this-&gt;removeLastSemicolon)?true:false);

This fix may or may not work for other properties, I have not tried it. The other properties I use (&#039;merge_selectors&#039;, &#039;template&#039; and &#039;preserveCss&#039;) seem to work fine.

Another suggested change would be to use &quot;require_once()&quot; instead of &quot;include_once()&quot; as the script should fail if it can&#039;t find the files it depends on.</description>
		<content:encoded><![CDATA[<p>Thanks a lot for these filters! They work quite well so far and saved me a lot of time.</p>
<p>I know you wrote this article 2.5 years ago, but I ran across a tiny bug with in the CssTidyFilter where the &#8220;remove_last_;&#8221; property doesn&#8217;t get set properly, though. The bug appears for me with Phing 2.4.0 and CssTidy 1.3 on Ubuntu 9.10 Karmic, haven&#8217;t tested other versions.</p>
<p>My build file has this line:<br />
$lt;param name=&#8221;remove_last_;&#8221; value=&#8221;true&#8221;/&gt;</p>
<p>And putting an echo in CssTidyFilter after calling getParam() shows that somewhere along the way it gets changed:<br />
var_dump($this-&gt;removeLastSemicolon) = string(1) &#8220;1&#8243;</p>
<p>So the following assignment fails:<br />
$css-&gt;set_cfg(&#8216;remove_last_;&#8217;,$this-&gt;removeLastSemicolon==&#8217;true&#8217;?true:false);</p>
<p>I will send a patch to the author, but in case he can&#8217;t get to it or no longer maintains this project, you can just do this (around line 202):<br />
$css-&gt;set_cfg(&#8216;remove_last_;&#8217;,!empty($this-&gt;removeLastSemicolon)?true:false);</p>
<p>This fix may or may not work for other properties, I have not tried it. The other properties I use (&#8216;merge_selectors&#8217;, &#8216;template&#8217; and &#8216;preserveCss&#8217;) seem to work fine.</p>
<p>Another suggested change would be to use &#8220;require_once()&#8221; instead of &#8220;include_once()&#8221; as the script should fail if it can&#8217;t find the files it depends on.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

