<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Dev 4 Web &#187; Site News</title>
	<atom:link href="http://nordz.sauleil.com/category/site-news/feed/" rel="self" type="application/rss+xml" />
	<link>http://nordz.sauleil.com</link>
	<description>Just another Developer WordPress Discovery Channel</description>
	<lastBuildDate>Mon, 12 Apr 2010 08:17:48 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Visual Studio &#8211; compress automatically your js file when building</title>
		<link>http://nordz.sauleil.com/2008/11/16/visual-studio-compress-automatically-your-js-file-when-building/</link>
		<comments>http://nordz.sauleil.com/2008/11/16/visual-studio-compress-automatically-your-js-file-when-building/#comments</comments>
		<pubDate>Sun, 16 Nov 2008 19:16:58 +0000</pubDate>
		<dc:creator>Nordes</dc:creator>
				<category><![CDATA[.Net]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Site News]]></category>
		<category><![CDATA[Visual Studio]]></category>

		<guid isPermaLink="false">http://nordz.sauleil.com/?p=213</guid>
		<description><![CDATA[I found out that tiny-MCE (Moxie) was using one of their tool called JSTrim. That executable is used to compress your JavaScript files when you want and it also use an XML configuration file so you can select multiple JS files and put them together. By example, if you have 5 classes defined in 5 [...]]]></description>
			<content:encoded><![CDATA[<p>I found out that <a href="http://tinymce.moxiecode.com/">tiny-MCE (Moxie)</a> was using one of their tool called <a href="http://http://moxieforge.net/overview.php?project_id=10&amp;category_id=7">JSTrim</a>. That executable is used to compress your JavaScript files when you want and it also use an XML configuration file so you can select multiple JS files and put them together. By example, if you have 5 classes defined in 5 different JS files, you can create only one file having all those classes. You can even create a temporary files that contains those files and then compress it using a javascript compressor. That compressor remove all comments and stuff like that. You can actually choose if you want it compressed &#8220;high&#8221; or &#8220;low&#8221;.</p>
<p>When I work I actually have a source control (Team Foundation Server) application inside my Visual Studio 2008. I wanted to have some JavaScript file to be compressed when I was publishing my application on the web server. To do so, I actually added a new JavaScript file containing nothing to the solution under my script folder and I checked in my stuff. After that, I also added my JSTrim somewhere in the project with it&#8217;s config file.</p>
<p>After I went inside the project properties (right click on the project/properties). I went inside the build event (Post Build event command line) and added those lines:</p>

<div class="wp_syntax"><div class="code"><pre>cd $(SolutionDir)Web\Script\
attrib -r myCompiledJS.js
JSTrim.exe -m high --config JSTrim.config
attrib +r myCompiledJS.js</pre></div></div>

<p>The <strong>$(SolutionDir)</strong> is actually a system variable or macro, so that you can export those settings on different computer without having problems. The <strong>Web\Script\</strong> is the folder inside your solution where you can find your <strong>JSTrim.exe</strong>. The <strong>attrib -r myCompiledJS.js</strong> is actually a windows command line executable that allow you to remove the read-only and then put it back using the <strong>+r</strong> feature. Any Windows system or dos system should be able to run that line. Concerning the JSTrim possible attributes, I suggest you to do <strong>JSTrim -h</strong> to get all parameter information.</p>
<p>So, by adding those lines inside the post-build, whenever you have a successfull build, it will regenerate the compiled JavaScript file. What I personally do, I use the compiler current mode (debug, release, etc.) to use the proper JavaScript file. When I&#8217;m in debug mode, I always keep the non compiled JS files and when I publish or run as &#8220;Release&#8221; I use those compiled files. The major reason to do that is because you may want to debug your JavaScript more easily.</p>
<p>If you have any question, ask them <img src='http://nordz.sauleil.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://nordz.sauleil.com/2008/11/16/visual-studio-compress-automatically-your-js-file-when-building/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Day 1 &#8211; Site Up and Running</title>
		<link>http://nordz.sauleil.com/2008/08/08/day-1-site-up-and-running/</link>
		<comments>http://nordz.sauleil.com/2008/08/08/day-1-site-up-and-running/#comments</comments>
		<pubDate>Sat, 09 Aug 2008 03:26:00 +0000</pubDate>
		<dc:creator>Nordes</dc:creator>
				<category><![CDATA[Site News]]></category>

		<guid isPermaLink="false">http://nordz.sauleil.com/?p=12</guid>
		<description><![CDATA[I will now be able to publish some of my code (JavaScript and .Net) here and much more. My experienced brother will also be a contributor on this site and will post some tips and cool code.
I hope you will enjoy our articles.
]]></description>
			<content:encoded><![CDATA[<p>I will now be able to publish some of my code (JavaScript and .Net) here and much more. My experienced brother will also be a contributor on this site and will post some tips and cool code.</p>
<p>I hope you will enjoy our articles.</p>
]]></content:encoded>
			<wfw:commentRss>http://nordz.sauleil.com/2008/08/08/day-1-site-up-and-running/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
