How to use the psi.output function in psi

To help you get started, we’ve selected a few psi examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github koljakutschera / yafbp / gulpfile.js View on Github external
_.each(dataPages, function (value, key, list) {

				console.log('Awaiting psi-report for: ' + url + '/' + key +'.html');

				psi.output(url + '/' + key +'.html',{
					nokey: 'true', // or use key: ‘YOUR_API_KEY’
					strategy: 'desktop',
				}).then(() => {
					
					psi.output(url + '/' + key +'.html',{
						nokey: 'true', // or use key: ‘YOUR_API_KEY’
						strategy: 'mobile',
					});
				});
			});
		}
github fusionstrings / project-fusion / gulp / tasks / pagespeed.js View on Github external
gulp.task('pagespeed', cb => {
  // Update the below URL to the public URL of your site
  pagespeed('example.com', {
    strategy: 'mobile',
    // By default we use the PageSpeed Insights free (no API key) tier.
    // Use a Google Developer API key if you have one: http://goo.gl/RkN0vE
    // key: 'YOUR_API_KEY'
  }, cb);
});
github dstroot / skeleton / gulpfile.js View on Github external
gulp.task('desktop', ['mobile'], function (cb) {
  // output a formatted report to the terminal
  psi.output(site, {
    strategy: 'desktop',
    locale: 'en_US',
    threshold: 80
  }, cb);
});
github Tempurturtul / udacity-fend-projects / fend-resume / gulpfile.js View on Github external
gulp.task('psi:desktop', ['serve:tunnelled'], function() {
  var site = browserSync.instance.tunnel.url;
  // Ensure http protocol is used to avoid breaking resources.
  site = site.replace(/^https?/, 'http');
  // Add user-defined path.
  site = site + (psiPath || '');

  return psi.output(site, {
    nokey: 'true',
    strategy: 'desktop',
    threshold: 1  // Prevents error if score is below default of 70.
  });
});
github dsebastien / midnightLightV2 / gulp / tasks / pagespeed.js View on Github external
gulp.task('pagespeed', 'Run PageSpeed Insights', (cb) =>{
	// Update the below URL to the public URL of your site
	pagespeed.output(packageJSON.homepage, {
		strategy: 'mobile' // desktop

		// Use the PageSpeed Insights free (no API key) tier.
		// Use a Google Developer API key if you have one: http://goo.gl/RkN0vE
		// key: 'API_KEY'
	}, cb);
});
github WPKitIO / WPKit / gulpfile.js View on Github external
gulp.task('pagespeed', function (cb) {
  // Update the below URL to the public URL of your site
  pagespeed.output('example.com', {
    strategy: 'mobile',
    // By default we use the PageSpeed Insights free (no API key) tier.
    // Use a Google Developer API key if you have one: http://goo.gl/RkN0vE
    // key: 'YOUR_API_KEY'
  }, cb);
});
github Tempurturtul / udacity-fend-projects / fend-design-patterns / cat-clicker-v1 / gulpfile.js View on Github external
gulp.task('psi:mobile', ['serve:tunnelled'], function() {
  var site = browserSync.instance.tunnel.url;
  // Ensure http protocol is used to avoid breaking resources.
  site = site.replace(/^https?/, 'http');
  // Add user-defined path.
  site = site + (psiPath || '');

  return psi.output(site, {
    nokey: 'true',
    strategy: 'mobile',
    threshold: 1  // Prevents error if score is below default of 70.
  });
});
github mikelambert / dancedeets-monorepo / server / gulpfile.babel.js View on Github external
gulp.task('pagespeed', cb =>
  // Update the below URL to the public URL of your site
  pagespeed(
    'https://www.dancedeets.com/new_homepage',
    {
      strategy: 'mobile',
      // By default we use the PageSpeed Insights free (no API key) tier.
      // Use a Google Developer API key if you have one: http://goo.gl/RkN0vE
      // key: 'YOUR_API_KEY'
    },
    cb
  )
);
github smspillaz / intuitive-math / internals / scripts / pagespeed.js View on Github external
function runPsi(url) {
  log('\nStarting PageSpeed Insights');
  psi.output(url).then(function (err) {
    process.exit(0);
  });
}

psi

PageSpeed Insights with reporting

Apache-2.0
Latest version published 3 years ago

Package Health Score

51 / 100
Full package analysis

Popular psi functions