<?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: Size matters</title>
	<atom:link href="http://nevstokes.com/blog/2008/03/14/size-matters/feed/" rel="self" type="application/rss+xml" />
	<link>http://nevstokes.com/blog/2008/03/14/size-matters/</link>
	<description>Random musings of a child progeny</description>
	<pubDate>Wed, 07 Jan 2009 20:23:38 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.7</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Nev</title>
		<link>http://nevstokes.com/blog/2008/03/14/size-matters/comment-page-1/#comment-110</link>
		<dc:creator>Nev</dc:creator>
		<pubDate>Mon, 24 Mar 2008 20:17:40 +0000</pubDate>
		<guid isPermaLink="false">http://nevstokes.com/blog/2008/03/14/size-matters/#comment-110</guid>
		<description>Thanks for that.

I'm relatively unexperienced in the ways of YUI so was unaware of the Loader filename extension assumptions.

I was making my own assumption with Windows filenames containing multiple .'s!</description>
		<content:encoded><![CDATA[<p>Thanks for that.</p>
<p>I&#8217;m relatively unexperienced in the ways of YUI so was unaware of the Loader filename extension assumptions.</p>
<p>I was making my own assumption with Windows filenames containing multiple .&#8217;s!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Satyam</title>
		<link>http://nevstokes.com/blog/2008/03/14/size-matters/comment-page-1/#comment-109</link>
		<dc:creator>Satyam</dc:creator>
		<pubDate>Sun, 23 Mar 2008 12:36:23 +0000</pubDate>
		<guid isPermaLink="false">http://nevstokes.com/blog/2008/03/14/size-matters/#comment-109</guid>
		<description>A few improvements (from my POV) that I made.

a) The YUI Loader assumes minified files to have a -min, not a .min extension.  

b) Your replace string for outfile makes a mess if the file has more than one dot in its name.  This might not be the case with libraries if you give them the same name as the namespace they are in, or if you include version numbers in the file name.  Each dot, wherever it is, is replaced by .min.  

c) You might not want to put your batch file in the Windows directory, I prefer to place it along the YUI Compressor itself.

So, my files where changed to:

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\CSSfile\Shell\yui]
@="YUI Compress"

[HKEY_CLASSES_ROOT\CSSfile\Shell\yui\command]
@="\"C:\\web\\YUI-Compressor\\yuicomp\" \"%1\""

[HKEY_CLASSES_ROOT\JSFile\Shell\yui]
@="YUI Compress"

[HKEY_CLASSES_ROOT\JSFile\Shell\yui\command]
@="\"C:\\web\\YUI-Compressor\\yuicomp\" \"%1\""

Notice the full location of the file is given, avoiding to use Windows or any other in the search path.

@echo off
setlocal
set infile=%1
set outfile=%~n1-min%~x1
set logfile=%~n1.log

java -jar "C:\web\YUI-Compressor\yuicompressor-2.3.5.jar" -v %infile% -o %outfile% 2&#62; %logfile%
endlocal

Notice how the outfile and logfile are created based on Windows own modifiers for filenames.  The location of the compressor is the same as for the batch file itself and both have to be changed if located elsewhere.  Also, I added the creation of a log file which stores the verbose (-v option) of the compressor since it can provide some useful hint.  You might omit it dropping the -v and the part from  the 2&#62; to the end.</description>
		<content:encoded><![CDATA[<p>A few improvements (from my POV) that I made.</p>
<p>a) The YUI Loader assumes minified files to have a -min, not a .min extension.  </p>
<p>b) Your replace string for outfile makes a mess if the file has more than one dot in its name.  This might not be the case with libraries if you give them the same name as the namespace they are in, or if you include version numbers in the file name.  Each dot, wherever it is, is replaced by .min.  </p>
<p>c) You might not want to put your batch file in the Windows directory, I prefer to place it along the YUI Compressor itself.</p>
<p>So, my files where changed to:</p>
<p>Windows Registry Editor Version 5.00</p>
<p>[HKEY_CLASSES_ROOT\CSSfile\Shell\yui]<br />
@=&#8221;YUI Compress&#8221;</p>
<p>[HKEY_CLASSES_ROOT\CSSfile\Shell\yui\command]<br />
@=&#8221;\&#8221;C:\\web\\YUI-Compressor\\yuicomp\&#8221; \&#8221;%1\&#8221;"</p>
<p>[HKEY_CLASSES_ROOT\JSFile\Shell\yui]<br />
@=&#8221;YUI Compress&#8221;</p>
<p>[HKEY_CLASSES_ROOT\JSFile\Shell\yui\command]<br />
@=&#8221;\&#8221;C:\\web\\YUI-Compressor\\yuicomp\&#8221; \&#8221;%1\&#8221;"</p>
<p>Notice the full location of the file is given, avoiding to use Windows or any other in the search path.</p>
<p>@echo off<br />
setlocal<br />
set infile=%1<br />
set outfile=%~n1-min%~x1<br />
set logfile=%~n1.log</p>
<p>java -jar &#8220;C:\web\YUI-Compressor\yuicompressor-2.3.5.jar&#8221; -v %infile% -o %outfile% 2&gt; %logfile%<br />
endlocal</p>
<p>Notice how the outfile and logfile are created based on Windows own modifiers for filenames.  The location of the compressor is the same as for the batch file itself and both have to be changed if located elsewhere.  Also, I added the creation of a log file which stores the verbose (-v option) of the compressor since it can provide some useful hint.  You might omit it dropping the -v and the part from  the 2&gt; to the end.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
