Yeoman is actually a combination of three tools, two of them already fairly popular. I’ll cover them in detail here just to solidify my knowledge AND to save you from browsing to each site manually.
The first tool that Yeoman uses is Bower. Originally created at Twitter, Bower is a package manager for front-end libraries. Meaning you can use it to manage your projects front-end development libraries. AKA update to the latest version of jQuery, LESS, and Bootstrap in one go, cool! It has access to literally thousands of different packages now, covering even the most obscure library.
Both of the above tools are already indispensable in terms of speeding up development time. To bind them all together we use Yo(Yeoman). Which also functions as a generator which creates all the scaffolding that you commonly include in every project.
First, you must have npm installed, go to http://nodejs.org/ and download the binary file.
If you are installing to a server via ssh, you’ll want to use these instructions, lifted directly from https://github.com/joyent/node/wiki/Installing-Node.js-via-package-manager
sudo apt-get update
sudo apt-get install python-software-properties python g++ make
sudo add-apt-repository ppa:chris-lea/node.js
sudo apt-get update
sudo apt-get install nodejs
After npm is installed, you can install Yeoman:
No need to manually install Bower or Grunt, Yeoman itself installs the rest.
Setting up a new project
First we will create a new folder and navigate to it in the cli.
Next, we run a command that generates the default Yeoman webapp.
It will ask you some questions, like which packages you would you like to include, this is entirely configurable depending on which generator you run. For now we will keep all the options ticked and proceed with the scaffolding.
Hint: you can navigate the list using your arrow keys and tick/untick options presented in the generator by pressing the space key
What if you forgot to include a dependency before running the scaffolding?! Well that’s easy to fix, you just make sure you are in your base project directory (./project-awesome) and run:
Now we run your newly generated app by using:
You should automagically have a browser tab open up with your fresh webapp!