Socket
Socket
Sign inDemoInstall

site-mobile-friendly

Package Overview
Dependencies
306
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    site-mobile-friendly

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


Version published
Weekly downloads
1
Maintainers
1
Created
Weekly downloads
 

Readme

Source

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

  • Following Google Mobile Friendly Test (Beta)
  • Uses Google Mobile Friendly Test API
  • You need to obtain an API Key from Google

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

Keywords

FAQs

Last updated on 20 Jun 2017

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc