O'Reilly logo

Learning Yeoman by Jonathan Spratley

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

The new Node.js module project

We can easily scaffold node modules using the Yeoman Node.js generator; all projects include nodeunit unit tests. The generator is based on the grunt-init-node module, authored by the magnificent GruntJS team.

Installing the generator-node

To install the Node.js generator, execute the following command:

$ npm install -g generator-node

The preceding command will install the Node.js generator globally on the system. Now, the yo node command can be invoked anywhere.

Scaffolding a Node.js module project

First create a new directory and make that the current working directory. To quickly scaffold a new Node.js module project, execute the following command:

$ yo node

The preceding command will prompt you with a series of questions ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required