<?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>shoogle designs&#039; blog &#187; Tag: yeoman</title>
	<atom:link href="/blog/blog/tag/yeoman/feed/" rel="self" type="application/rss+xml" />
	<link>https://shoogledesigns.com/blog</link>
	<description></description>
	<lastBuildDate>Sun, 24 Aug 2014 17:33:27 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.6.1</generator>
		<item>
		<title>Speed up your CSS framework install with Yeoman</title>
		<link>https://shoogledesigns.com/blog/blog/2013/08/02/speed-up-your-css-framework-install-with-yeoman/</link>
		<comments>https://shoogledesigns.com/blog/blog/2013/08/02/speed-up-your-css-framework-install-with-yeoman/#comments</comments>
		<pubDate>Fri, 02 Aug 2013 12:28:15 +0000</pubDate>
		<dc:creator>shoogledesigns</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[bower]]></category>
		<category><![CDATA[grunt]]></category>
		<category><![CDATA[yeoman]]></category>
		<category><![CDATA[yo]]></category>

		<guid isPermaLink="false">https://shoogledesigns.com/blog/?p=1491</guid>
		<description><![CDATA[<p>I have finally taken the time to give Yeoman a go. &#8220;Finally&#8221; as it had been on my to do list for a while but the current projects and some deserved vacation had kept me away from it. For those who don&#8217;t know, Yeoman is a collection of tools and best practices helping designers and [&#8230;]</p><p>The post <a href="/blog/blog/2013/08/02/speed-up-your-css-framework-install-with-yeoman/">Speed up your CSS framework install with Yeoman</a> appeared first on <a href="/blog">shoogle designs&#039; blog</a>.</p>]]></description>
				<content:encoded><![CDATA[
<!-- wp-jquery-lightbox, a WordPress plugin by ulfben --> 
<p>I have finally taken the time to give <a href="http://yeoman.io/" title="Yeoman" target="_blank">Yeoman</a> a go. &#8220;Finally&#8221; as it had been on my to do list for a while but the current projects and some deserved vacation had kept me away from it.<br />
<span id="more-1491"></span><br />
For those who don&#8217;t know, Yeoman is a collection of tools and best practices helping designers and developers in their webapp development process.</p>
<p>First of all, let me point out that Yeoman is made by awesome folks (among those feature the likes of Paul Irish and Addy Osmani), and is basically made of three tools:</p>
<ul class="post">
<li>Yo for web application scaffolding which utilizes scaffolding templates refered to as generators</li>
<li>Grunt for building, previewing, and testing</li>
<li>Bower for dependency management</li>
</ul>
<h3>Yeoman Install</h3>
<p>Making sure that your system does include <a href="http://nodejs.org/" title="Node" target="_blank">Node</a>, and <a href="http://git-scm.org/" title="Git" target="_blank">Git</a>, open your terminal and run the following commands to install yeoman</p>
<pre class="brush: bash; title: ;">
npm install -g yo
npm install -g generator-webapp
</pre>
<p>If all went well, you should be able to see a version number when running:</p>
<pre class="brush: bash; title: ;">
yo --version
</pre>
<h3>Twitter Bootstrap install</h3>
<p>Right, we are ready to start using Yeoman and reduce dramatically our css framework installation time.<br />
In the terminal, simply type:</p>
<pre class="brush: bash; title: ;">
yo (refrain from adding biatch behind)
</pre>
<p><img src="/blog/wp-content/uploads/2013/08/yeoman-install.jpg" alt="Yeoman install" title="yeoman-install" width="1590" height="650" class="alignnone size-full wp-image-1503" /></p>
<p>Choose to Run the webapp generator. Yeoman will state that it uses HTML5 Boilerplate, jQuery and Modernizr out of the box, and it will ask you to answer a few questions on your webapp install.</p>
<p>I usually go with the following:</p>
<p><code>[?] Would you like to include Twitter Bootstrap for Sass? <strong>Yes</strong><br />
[?] Would you like to include RequireJS (for AMD support)? <strong>No</strong><br />
[?] Would you like to use autoprefixer for your CSS? <strong>No</strong></code></p>
<p>Open your project in Sublime text, you will see that in just a few yeoman commands, you already have quite a few things going on.</p>
<p>A nice project structure to start with a dedicated app folder, some components (in app/bower_components) including by default jquery and modernizr, and the requested twitter bootstrap.</p>
<p><img src="/blog/wp-content/uploads/2013/08/yeoman-file-structure.jpg" alt="Yeoman file structure" title="Yeoman file structure" width="1590" height="650" class="alignnone size-full wp-image-1501" /></p>
<p>Now comes the beauty of it all. In your terminal, type the following command:</p>
<pre class="brush: bash; title: ;">
grunt server
</pre>
<p><img src="/blog/wp-content/uploads/2013/08/yeoman-web-server.jpg" alt="Yeoman local web server" title="yeoman-web-server" width="1590" height="650" class="alignnone size-full wp-image-1508" /></p>
<p>And voila. You don&#8217;t even have to use mamp and create a local web server, Yeoman will do it for you with its grunt component.<br />
Go ahead and make some changes to your index file. Upon Save, the browser will be updated without having to install/trun on Livereload, or use Codekit.</p>
<p>Note that you will get a conflict if you have a Livereload package installed in your Sublime Text. Therefore use your package control to uninstall it if you do.</p>
<p>Right, so in no time, we have a Sass-ready twitter bootstrap-based website running, how good was that?!</p>
<h3>Package management with Bower</h3>
<p>The other beauty of Yeoman is how easy installing and uninstalling any component has become.</p>
<p>Look for the .git of your choice by running a search:</p>
<pre class="brush: bash; title: ;">
bower search
</pre>
<p>&#8230;will show you all components, while:</p>
<pre class="brush: bash; title: ;">
bower search angular
</pre>
<p>&#8230;will show you all angular-related gits.</p>
<p>Uninstalling is as easy, and since we want to install foundation and get rid of twitter bootstrap, let&#8217;s uninstall bootstrap now.</p>
<p>Simply run:</p>
<pre class="brush: bash; title: ;">
bower uninstall sass-bootstrap
</pre>
<p>In a tick, you will have your wish granted, and your file structure updated, bootstrap having disappeared from the app/bower_components folder.</p>
<p>If you run grunt server again, you will get an error and your project won&#8217;t compile.</p>
<p>To see what the issue is, run: </p>
<pre class="brush: bash; title: ;">
grunt server --force
</pre>
<p>Project compiles with errors, and you can see that your scss is still referencing some twitter bootstrap files (since removed).<br />
Clear your scss file and also remove the bootstrap js files at the bottom of your index.html.</p>
<h3>Foundation install</h3>
<p>Likewise let&#8217;s install Zurb&#8217;s CSS framework, by running:</p>
<pre class="brush: bash; title: ;">
bower install foundation
</pre>
<p>A foundation folder has now made its way into your bower components.</p>
<p>Go to the <a href="http://foundation.zurb.com/templates.php" title="Zurb Foundation templates" target="_blank">Foundation templates</a> and copy one of the html template and paste into the body of your index.html.</p>
<p>Once saved, you&#8217;ll get an un-styled foundation template on screen. Reference the foundation style by incorporating its scss to your main.scss.<br />
There might be a better way to do it, but I usually go with:</p>
<pre class="brush: css; title: ;">
@import &quot;../bower_components/foundation/scss/foundation&quot;;
@import &quot;compass&quot;; // you can aslo throw your compass import in there
</pre>
<p>Boom! Sass-ready Compass-ready Foundation framework installed.</p>
<p><img src="/blog/wp-content/uploads/2013/08/yeoman-foundation-install.jpg" alt="Yeoman Foundation install" title="yeoman-foundation-install" width="1590" height="650" class="alignnone size-full wp-image-1502" /></p>
<h3>Build time</h3>
<p>Ready for production? Let&#8217;s build. Ctrl+C in your terminal to stop the local server. and run:</p>
<pre class="brush: bash; title: ;">
grunt
</pre>
<p>This is when Gruntfile.js does its magic and builds a new dist folder with all production files in it, ignoring all the unneccessary files (such as the git or the scss files).</p>
<p>To run the dist folder with grunt, type:</p>
<pre class="brush: bash; title: ;">
grunt server:dist
</pre>
<p>This time, you&#8217;ll end up with a similar-looking project, but if you look under the hood, and view source, you&#8217;ll see a website ready for production, with properly-cached and minified css/js files.</p>
<p>You&#8217;ve got to love the simplicity of Yeoman!</p>
<p>Drop a line in the comments if you&#8217;re a Yeoman fan, and know more tips and tricks on the subject.</p>
<div style="background-color:#EDC591">Update Aug 26th 2013</div>
<p>Since I wrote this post, Addy Osmani has released an awesome video on the future of Yeoman. Check it out to see what&#8217;s cooking for us Yeoman users. Also note that a stable <a href="http://yeoman.io/blog/hello-1.0.html" title="RELEASE THE KRAKEN! - ANNOUNCING YEOMAN 1.0" target="_blank">Yeoman 1.0 has just been released</a>.</p>
<p>Also note the new one-step install, generator-webapp now taking care of the install of yo/grunt/bower for you.</p>
<div class="videoWrapper"><iframe width="420" height="315" src="//www.youtube.com/embed/MTYZzs8ud3E" frameborder="0" allowfullscreen></iframe></div>
<p>The post <a href="/blog/blog/2013/08/02/speed-up-your-css-framework-install-with-yeoman/">Speed up your CSS framework install with Yeoman</a> appeared first on <a href="/blog">shoogle designs&#039; blog</a>.</p>]]></content:encoded>
			<wfw:commentRss>https://shoogledesigns.com/blog/blog/2013/08/02/speed-up-your-css-framework-install-with-yeoman/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Served from: shoogledesigns.com @ 2014-08-31 17:00:42 -->