Tags

I recently went through the process of figuring out how to use Yeoman on a Windows Machine. I thought it would be a good idea to document to process so I could do it again if need be. I also thought there might be others attempting the same thing and my process might be of some help.

At the time of this writing, Yeoman as a warning on their site stating that “This beta does not yet work on Windows. We’ll be working hard to fix this towards the final release.” So far, I have not run into any issues using Yeoman 1.0 Beta on my Windows machines using the process I will outline in this post. Of course I might just not have run into them yet. Therefore following this advice is done entirely at your own risk, with no liability to myself.

That said, if you run into any issues or have a suggestion for a better way to accomplished any task please let me know in the comments. I will attempt to keep this post up-to-date.

I created and tested this process using:

Okay, here it is.

Install GitHub for Windows

  • Navigate to GitHub for Windows
  • Download & install GitHub for Windows
  • Run GitHub for Windows
  • Navigate to ‘tools’ > ‘options’
  • Set the following options:
    • If you haven’t already, log in to GitHub using your account
    • Under ‘configure git’ ensure your name & email is set
    • Under ‘default storage directory’ set the location you want your repos to be stored
    • Under ‘default shell’, select ‘PowerShell’

Install ConEmu (optional)

ConEmu is a command line emulator that can be used instead of the built in command console. This is an optional install.
If you choose to install this console, use it instead whenever a ‘command prompt’ is asked for

  • Navigate to ConEmu
  • Download & install the ‘latest’ version appropreate to your O/S.

Install Chocholatey

@powershell -NoProfile -ExecutionPolicy unrestricted -Command "iex ((new-object net.webclient).DownloadString('http://chocolatey.org/install.ps1'))" && SET PATH=%PATH%;%systemdrive%\chocolatey\bin - See more at: http://chocolatey.org/#sthash.3BDgPR0h.dpuf
				
  • Using an ‘administrator’ command prompt, paste the text and execute it.

Setup Chocholatey Environment Variable

  • Open the ‘Environment Variables’ Dialog (System Properties > Advanced > Environment Variables)
  • Ensure the following products have their location included in the ‘user’ or ‘system’ path
Variable: Path; Value: C:\Chocolatey\bin
  • Ensure an environment variable named ‘ChocolateyInstall’ has been created with the value ‘C:\Chocolatey’
Variable: ChocolateyInstall; Value: C:\Chocolatey

Install Software Prerequitets via Chocholatey

Execute each of the following commands in sequence

cinst ruby
cinst compass -source ruby
cinst libjpeg-turbo
cinst OptiPNG
cinst PhantomJS
cinst nodejs.install

Setup Browser & Tool Environment Variables

  • Open the ‘Environment Variables’ Dialog (System Properties > Advanced > Environment Variables)
  • Create the following as ‘User’ Environment Variables for each browser you have installed
CHROME_BIN = location of chrome.exe (ie: C:\Users\(user.name)\AppData\Local\Google\Chrome SxS\Application\chrome.exe)
CHROME_CANARY_BIN = location of chrome.exe (canary)
FIREFOX_BIN = location of firefox.exe
IE_BIN = location of iexplorer.exe				
PHANTOMJS_BIN = location of phantomjs.exe (ie: C:\PhantomJS\phantomjs.exe)
  • Ensure the following products have their location included in the ‘user’ or ‘system’ path
Ruby
libjpeg-turbo64
OptiPNG
PhantomJS
nodejs
npm

Install Yeoman, Grunt & Bower

Using a ‘administrator’ command prompt

  • Execute the following command
npm install -g yo grunt-cli bower

And you should now be ready to start using Yeoman!

Advertisement