X

LATEST #JQUERY NEWS

Using Yeoman for jQuery


Yeoman is a web scaffolding tool for creating modern web app. Which means it provides project structure to start with, loads all the dependencies and prescribe best practices.  It’s quite useful for everyone as it saves time. So in this post, learn how to use Yeoman for creating jQuery plugin.

To use Yeoman, you need to use npm. Npm is nothing but node js package manager console. First install node.js. You can download it here. Once it is installed then, go to command prompt and type “npm” command to see if it is installed properly.

Next, you need to install Yeoman. The Yeoman is composed of three tools: yo (a scaffolding tool), Grunt/Gulp (A JavaScript task runner and a build tool) and Bower, a package manager (alternatives are available).

So to install Yeoman with all 3 tools, run following command.

npm install -g yo bower grunt-cli gulp

Now, the next step is to install a generator. A generator will provide you the basic structure and all dependencies. And for every language/framework/Application, there is a separate generator. So for jQuery plugin, we need to install a jquery generator. Run below command to install this generator.

npm install --global generator-jquery

Once installed, now run below command to create jQuery plugin structure.

yo jquery

And it will prompt for plugin name, description, version, jQuery version, git user name, email, project name. Once you provide all the details your project is ready.

Similarly, you can also create jQuery mobile application. All you need to do is to install jquery-mobile generator.

npm install -g generator-jquery-mobile

Once installed, now run below command to create jQuery plugin structure.

yo jquery-mobile

You can also use Yeoman for other language like AngularJs, ASP.NET and for basic web development purpose.

Recently Published

article image
»

Add Keyboard Shortcut to Anchor Tag Using jQuery

Making a user friendly website can be quite a challenging task. There ...

Screen Shot 2017-04-23 at 10.15.41 AM
»

How to Use jQuery to Create a Sticky Navigation on Scroll

Creating “sticky” elements is something that can often be ...

article image
»

How to Use jQuery’s Keystroke Methods

jQuery has a few built-in keystroke methods that are all triggered by ...

article image
»

How to Change iFrame Styling Using jQuery

If you’ve ever had the displeasure of working with iFrames, ...

article image
»

How to Use jQuery to Create Blinking Text

Blinking text is one of those cool features that you never actively ...

article image
»

Convert Images to Black and White using jQuery

Converting an image to black and white is no longer a manual event. ...

article image
»

How to Disable Right-Click Menu Using jQuery

There can be dozens of reasons why you may want to disable right ...

article image
»

How to Optimize jQuery Code for Better Performance

jQuery is the most popular client side library, in fact almost every ...

article image
»

Using Head.js to Load All Your JavaScript

In the past few years, client side frameworks/libraries have become ...