WoJ
  • Blog
  • About Jim

A place to obtain the wisdom of Jim.

Realizing the Awesome Powers of Yeoman.

3/5/2016

Comments

 
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!
Picture

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:
  • Controller as "vm" syntax
  • Custom Directives
  • A clear path to break your js into services.
  • A super amazing set of gulp scripts all ready to go.
  • Set up for unit tests and protractor e2e tests. 
  • Set up with your choice of Sass of Less.
  • bower/npm dependencies installed and good to go.

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. :)
Comments
comments powered by Disqus

    ​Author

    Picture
    The posts on this site are written and maintained by Jim Lynch. About Jim...

    Categories

    All
    Actionscript 3
    Angular
    AngularJS
    Automated Testing
    AWS Lambda
    Behavior Driven Development
    Blogging
    Business Building
    C#
    C / C++
    ClojureScript / Clojure
    Coding
    Community Service
    CS Philosophy
    Css / Scss
    Dev Ops
    Firebase
    Fitness
    Flash
    Front End
    Functional Programming
    Git
    Go Lang
    Illustrations
    Java
    Javascript
    Lean
    Life
    Node.js
    Planning
    Productivity
    Professionalism
    Python
    React
    Redux / Ngrx
    Refactoring
    Reusable Components
    Shell Scripting
    Swift
    Test Driven Development
    TypeScript
    Useful Sites
    Useful Tools
    Video
    Website Development
    WebStorm
    Writing

    Archives

    April 2018
    March 2018
    February 2018
    January 2018
    December 2017
    November 2017
    October 2017
    September 2017
    August 2017
    July 2017
    May 2017
    April 2017
    March 2017
    February 2017
    January 2017
    December 2016
    November 2016
    October 2016
    September 2016
    August 2016
    July 2016
    June 2016
    May 2016
    April 2016
    March 2016
    February 2016
    January 2016
    December 2015
    November 2015
    October 2015

    RSS Feed


WoJ © 2015 - 2016
  • Blog
  • About Jim
✕