Book Image

Learning Yeoman

By : Jonathan Spratley
Book Image

Learning Yeoman

By: Jonathan Spratley

Overview of this book

Table of Contents (17 chapters)
Learning Yeoman
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Free Chapter
1
Modern Workflows for Modern Webapps
Index

The new jQuery project


Let's create a new jQuery project that will demonstrate using the Yeoman jQuery generator to quickly create a reusable plugin, which is fully tested and deployed to Bower for consumption by others in the community. This plugin will simply call CRUD methods on the client side by creating utility methods that aid in sending GET/PUT/POST/DELETE requests to the server and handling the response accordingly. Let's get started.

This generator is based on grunt-init-jquery, authored by the magnificent GruntJS team.

Installing the generator-jquery

To install the jQuery generator, open the terminal and execute the following command:

$ npm install -g generator-jquery

The preceding command will install the jQuery generator globally on the system. Now, the yo jquery command can be invoked anywhere.

Scaffolding a jQuery project

First create a new directory and make that the current working directory. To scaffold a new jQuery project, open a terminal and execute the following command...