
The generator will ask a series of questions to determine how you want the app configured and what packages you'd like to include - would you like to use Sass, for example, or include Bootstrap. Would you like to use Sass (with Compass)? (Y/n) Out of the box I include Bootstrap and some AngularJS recommended modules. In this case, we want yo to use the angular generator to create an app called hello. Interaction with Yeoman takes place through the yo command.

Yeoman will generate an app in the current working directory, so start with an existing empty directory or create a new one for your app. Again, make sure to specify the -g flag: $ npm install -g generator-angular We'll also use npm to install Yeoman's Angular generator. Depending on your platform and account configuration, you may need to login as an administrator or run npm install using sudo, though this isn't considered a best practice.

To begin, we tell npm to install the yo package globally (using the -g flag) which will allow us to run Yeoman in any directory. npm ships automatically with Node - if you don't have it, you'll need to download and install Node first. Yeoman is installed using npm, Node.js's package manager. Here, we'll focus on the AngularJS generator. Somewhere around 1,000 generators are available for Yeoman, ranging from AngularJS to Jekyll to Chrome extensions. When it comes time to deploy, they'll minify all of the app's code, optimize images, compile CoffeeScript and Compass files, and package the app for distribution.

Yo handles scaffolding of the application, while Grunt takes care of build processes and Bower manages the application's dependencies.ĭuring development, these tools will do things like create the development environment, automatically reload the browser when changes are saved, handle notification for Angular apps, and make sure packages are up-to-date.

Yeoman is a collection of three tools - called Yo, Grunt, and Bower - that allow developers to concentrate on building the functionality of an application, rather than working to build its infrastructure. Ari built the first versions of AT&T’s API and mHealth platforms and literally wrote the book on integrating D3 and AngularJS.
