Gulp PSI a command line tool for fetching google page speed

Gulp PSI CLI Tool

PSI module is available for getting page speed. to set it up with gulp follow these steps.

First install gulp-cli and psi via npm

const psi = require('psi');
var gulp = require('gulp'),
    site = "http://my-website.com";

gulp.task('desktop', function () {
   psi(site, {
            nokey: 'true',
            strategy: 'desktop',
        })
       .then(function (data) {
            console.log(site +" \tdesktop\t"+ data.ruleGroups.SPEED.score);
        });
});

gulp.task('Mobile', function () {
   psi(site, {
            nokey: 'true',
            strategy: 'mobile',
        })
       .then(function (data) {
            console.log(site +" \mobile\t"+ data.ruleGroups.SPEED.score);
        });
});

2 thoughts on “Gulp PSI a command line tool for fetching google page speed

  • September 22, 2016 at 4:38 am
    Permalink

    You need to take part in a contest for one of the best websites on the internet.
    I will recommend this site!

    Reply
    • September 22, 2016 at 6:59 am
      Permalink

      Thanks 300 mg cost i will try.

      Reply

Leave a Reply

Your email address will not be published. Required fields are marked *