Skip to content

Checks if the site is mobile-friendly (by Google Search Console API). Renders detailed reports.

License

Notifications You must be signed in to change notification settings

SnigBhaumik/site-mobile-friendly

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

site-mobile-friendly

Checks if the site is mobile-friendly (by Google Search Console API). Renders detailed reports.

Sample Output (by Node CLI)

Mobile Friendly Test Result

Installing

$ npm install --save site-mobile-friendly

Background

Part of our Dev Ops automation process. After deploying the application in one of the servers, Mobile friendly testing should have been done automatically. This Node module is used and triggered by Jenkins build pipeline to report the web portal mobile friendlyness. Can be used for any type of web site and portal.

Pre requisites

Usage

Node CLI

You need to pass two command line arguments (both mandatory).

  • apiKey: the API key you have obtained from Google
  • site: the url of the site you are going to test
$ node index --apiKey <<your-key>> --site www.google.com

Gulp

You need to pass two command line arguments (both mandatory).

  • apiKey: the API key you have obtained from Google
  • site: the url of the site you are going to test
$ gulp --apiKey <<your-key>> --site www.google.com

API

Use the mobile-friendly-api module for this.

var mobile_test = require('site-mobile-friendly/mobile-friendly-api');
var params = {
	apiKey: '<<your-key>>',
	site: 'www.google.com'
};

mobile_test(params, function(err) {
	if (err)	console.log(err);
});

License

MIT

About

Checks if the site is mobile-friendly (by Google Search Console API). Renders detailed reports.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published