Before a few weeks ago I had know about Yeoman (that it was a thing), but I had never actually used it. On the site it talks about "scaffolding" your application, but what does that actually mean? In short, yeoman saves you all the time of setting up your folders, getting bower / npm dependencies, setting up grunt (or gulp, your choice), configuring it with the basics (like minify, uglify, copy to dist folder), setting up initial unit tests and karma test runner, adding bootstrap responsiveness to your site (optional), and with the angular generator I'll talk about here it will even set up a basic angular module with two controllers and a nav bar. All from a single command in your terminal. Wow!!
Great for Beginners and Experts
Yeoman generator is a fantastic tool for both experts and beginners. It's great for experts because it saves so much time and creates the entire structure and "boring setup" parts so you can get right down to building features. You can also be confident there were no careless mistakes during setup and not waste time there. It's arguably even more helpful for beginners because it shows you how you should structure you angular application.
So What Does It Really Do?
Yeoman generates folders and files. That statement is extremely downplaying the power and sheer number of folders and files it creates, but when you really think about it that's all that's happening when you run the yo command. And because I've been feeling especially Angular-y recently we'll look at doing the yo angular command. First you'll need to install yeoman globally. I'd recommend looking at my other blog post how to install yeoman in order to get it set up quickly and easily on your machine. Talk a look below at all the folders and files create by yeoman. Before running the command, the yo-charts folder was completely empty!
A Huge Step in the Right Direction
Not only does the generator do all the boring, tedious work of setting up the boilerplate code in your project, but it builds it in a very best-practices-following sort of way. Here are just a few of the very good things that you get when starting from the gulp-angular scaffolded project:
Bottom Line: Yeoman Generators are the Shiznit
I'm planning to write a post specifically about my favorite yeoman generator, gulp-angular. This post was mainly just to hype up yeoman generators in general and get you excited to use them. Let me know if it worked in the comments below. :)
The posts on this site are written and maintained by Jim Lynch. About Jim...