<?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>boilerplate | Nerdpress.org</title>
	<atom:link href="https://nerdpress.org/tag/boilerplate/feed/" rel="self" type="application/rss+xml" />
	<link>https://nerdpress.org</link>
	<description>...dev, tech problems and solutions.</description>
	<lastBuildDate>Tue, 13 Sep 2011 14:28:30 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.4</generator>
	<item>
		<title>Boilerplate Build mit FTP deploy</title>
		<link>https://nerdpress.org/2011/09/13/boilerplate-build-mit-ftp-deploy/</link>
					<comments>https://nerdpress.org/2011/09/13/boilerplate-build-mit-ftp-deploy/#comments</comments>
		
		<dc:creator><![CDATA[Ivo Bathke]]></dc:creator>
		<pubDate>Tue, 13 Sep 2011 09:12:02 +0000</pubDate>
				<category><![CDATA[Deployment]]></category>
		<category><![CDATA[Project Setup]]></category>
		<category><![CDATA[Ant]]></category>
		<category><![CDATA[boilerplate]]></category>
		<category><![CDATA[deploy]]></category>
		<category><![CDATA[yui-compressor]]></category>
		<guid isPermaLink="false">https://nerdpress.org/?p=1652</guid>

					<description><![CDATA[<p>Da habe ich mir letztens die html5 boilerplate angeschaut und musste feststellen, dass die einen ziemlich guten build mitbringt. Dieser optimiert Bilder, konkateniert und komprimiert alles was so geht, mit Hilfe von u.a. dem YUI Kompressor. Was es noch nicht kann ist der Deploy, aber das kann man ihm ja beibringen ;) Nun denn, direkt &#8230; </p>
<p class="link-more"><a href="https://nerdpress.org/2011/09/13/boilerplate-build-mit-ftp-deploy/" class="more-link">Continue reading<span class="screen-reader-text"> "Boilerplate Build mit FTP deploy"</span></a></p>
The post <a href="https://nerdpress.org/2011/09/13/boilerplate-build-mit-ftp-deploy/">Boilerplate Build mit FTP deploy</a> first appeared on <a href="https://nerdpress.org">Nerdpress.org</a>.]]></description>
										<content:encoded><![CDATA[<p>Da habe ich mir letztens die <a href="http://html5boilerplate.com/">html5 boilerplate</a> angeschaut und musste feststellen, dass die einen ziemlich guten build mitbringt.<br />
Dieser optimiert Bilder, konkateniert und komprimiert alles was so geht, mit Hilfe von u.a. dem YUI Kompressor.<br />
Was es noch nicht kann ist der Deploy, aber das kann man ihm ja beibringen ;)</p>
<p><span id="more-1652"></span>Nun denn, direkt mal probieren, der Post <a href="http://net.tutsplus.com/tutorials/html-css-techniques/automated-optimization-with-html5-boilerplate-build/">hier</a> beschreibt schon ziemlich gut was und wie man da was machen kann.</p>
<p>Ich benutze noch ant 1.8.0, also machen wir was uns vorgeschlagen wird:</p>
<blockquote><p>All features of the build script require Ant version 1.8.2. Please upgrade to 1.8.2 or remove all instances of &#8216;overwrite=no&#8217; (and this fail task) from the build script to continue</p></blockquote>
<p>Also alle overwrite Attribute raus und den Test Task rausnehmen:<br />
Den Testtask rausnehmen:</p>
<pre class="brush: xml; title: ; notranslate">
 &lt;fail message=&quot;All features of the build script require Ant version 1.8.2. Please upgrade to 1.8.2 or remove all instances of 'overwrite=no' (and this fail task) from the build script to continue&quot;&gt;
        &lt;condition&gt;
            &lt;not&gt;
                &lt;contains string=&quot;${ant.version}&quot; substring=&quot;1.8.2&quot;/&gt;
            &lt;/not&gt;
        &lt;/condition&gt;
 &lt;/fail&gt;
</pre>
<p>Dann probieren:</p>
<pre class="brush: bash; title: ; notranslate">
cd build
ant
</pre>
<p>Und funktioniert: in publish liegt jetzt das optimierte Web Projekt.</p>
<p>Danach noch die buffer folder leeren, ist nicht unbedingt nötig aber macht Spaß :)</p>
<pre class="brush: bash; title: ; notranslate">ant clean</pre>
<p>Um die Bilder Optimierung anzuschalten, muss ich noch die libs dafür nach installieren:</p>
<pre class="brush: bash; title: ; notranslate">sudo apt-get install libjpeg-progs optipng</pre>
<p>Kleiner Tip noch:<br />
Nutzt man zusätzliche javascript libs, die nicht konkateniert werden sollen, sollte man die nicht zwischen die comments schreiben.<br />
Diese hier:</p>
<pre class="brush: xml; title: ; notranslate">
 &lt;!-- scripts concatenated and minified via ant build script--&gt;
 &lt;!-- end scripts--&gt;
</pre>
<p>Und um es auf die Spitze zu treiben lassen wir mal den vollen minify laufen:</p>
<pre class="brush: bash; title: ; notranslate">ant minify</pre>
<p>Der komprimiert zusätzlich noch das Markup.</p>
<p>Aufräumen:</p>
<pre class="brush: bash; title: ; notranslate">ant clean</pre>
<p>Nun noch den publish folder uploaden:<br />
Ich will ja FTP via ant benutzen also vorher die Abhängigkeiten davon installieren, siehe hier in einem alten <a href="https://nerdpress.org/2011/07/29/install-ant-ftp-task-on-ubuntu/">Post</a> von mir.<br />
Außerdem muss man noch die FTP properties angeben, das passiert in config/project.properties:</p>
<pre class="brush: bash; title: ; notranslate">
 #FTP deploy
 tool.ftp.host = host
 tool.ftp.user = user
 tool.ftp.password = password
 tool.ftp.remotedir = httpdocs
</pre>
<p>Holt man sich die boilerplate direkt von <a href="https://github.com/paulirish/html5-boilerplate">github</a>, ist da eine Neuerung drin, welche erlaubt den Build zu erweitern, indem man eine project.xml anlegt und darin seine eigenen targets anlegen kann.<br />
Benutzt man die letzte stable version muss man den task direkt in die build.xml schreiben.</p>
<p>Der FTP task ist ganz simpel ohne Spirenzien:</p>
<pre class="brush: xml; title: ; notranslate">
&lt;target name=&quot;ftpupload&quot; description=&quot;uploads the publish folder to your web space via ftp&quot;&gt;
	&lt;ftp server=&quot;${tool.ftp.host}&quot; userid=&quot;${tool.ftp.user}&quot; password=&quot;${tool.ftp.password}&quot; timediffauto=&quot;false&quot; remotedir=&quot;${tool.ftp.remotedir}&quot; action=&quot;send&quot; verbose=&quot;yes&quot; passive=&quot;yes&quot; depends=&quot;yes&quot;&gt;
            &lt;fileset dir=&quot;${dir.publish}&quot;&gt;
            &lt;/fileset&gt;
        &lt;/ftp&gt;
&lt;/target&gt;
</pre>
<p>Dann mal uploaden:</p>
<pre class="brush: bash; title: ; notranslate">ant ftpupload</pre>
<p>Komplett ist das dann so:</p>
<pre class="brush: bash; title: ; notranslate">
 ant minify
 ant ftpupload
 ant clean
</pre>The post <a href="https://nerdpress.org/2011/09/13/boilerplate-build-mit-ftp-deploy/">Boilerplate Build mit FTP deploy</a> first appeared on <a href="https://nerdpress.org">Nerdpress.org</a>.]]></content:encoded>
					
					<wfw:commentRss>https://nerdpress.org/2011/09/13/boilerplate-build-mit-ftp-deploy/feed/</wfw:commentRss>
			<slash:comments>2</slash:comments>
		
		
			</item>
	</channel>
</rss>
