gpagespeed
Advanced tools
Comparing version 0.0.4 to 0.0.5
@@ -5,3 +5,3 @@ var request = require('request') | ||
module.exports = function(opts, callback){ | ||
if(!opts.key){ | ||
if(!opts.key && !opts.nokey){ | ||
return callback(new Error('Missing required param: key'), null); | ||
@@ -8,0 +8,0 @@ } |
{ | ||
"name": "gpagespeed", | ||
"description": "Analyze a webpage with Google PageSpeed", | ||
"version": "0.0.4", | ||
"author": "Geir Gåsodden <geir.gasodden@pythonia.no>", | ||
"version": "0.0.5", | ||
"author": { | ||
"name": "Geir Gåsodden", | ||
"email": "geir.gasodden@pythonia.no" | ||
}, | ||
"main": "index.js", | ||
"bin": { | ||
"gpagespeed": "cli.js" | ||
}, | ||
"engines": { | ||
"node": ">=0.10.0" | ||
}, | ||
"scripts": { | ||
"test": "mocha test/test.js --timeout 10s" | ||
}, | ||
"files": [ | ||
"index.js", | ||
"cli.js" | ||
], | ||
"repository": { | ||
@@ -18,3 +31,4 @@ "type": "git", | ||
"dependencies": { | ||
"request": "^2.34.0" | ||
"request": "^2.34.0", | ||
"minimist": "0.0.8" | ||
}, | ||
@@ -21,0 +35,0 @@ "devDependencies": { |
@@ -1,4 +0,4 @@ | ||
#gpagespeed | ||
#gpagespeed [![Build Status](https://travis-ci.org/zrrrzzt/gpagespeed.svg?branch=master)](https://travis-ci.org/zrrrzzt/gpagespeed) | ||
Node.js module for analyzing a webpage with [Google PageSpeed Insights](https://developers.google.com/speed/docs/insights/v1/getting_started). | ||
Node.js module/CLI app for analyzing a webpage with [Google PageSpeed Insights](https://developers.google.com/speed/docs/insights/v1/getting_started). | ||
@@ -9,3 +9,3 @@ To use this you must Acquire an API key from [Google Developers Console](https://console.developers.google.com/). | ||
##Installation## | ||
##Installation | ||
``` | ||
@@ -15,8 +15,12 @@ $ npm install gpagespeed | ||
##Test## | ||
or globally for the CLI app | ||
``` | ||
$ npm install gpagespeed -g | ||
``` | ||
##Test | ||
Make sure you have [Mocha](http://visionmedia.github.io/mocha/) installed globally or just do an npm install in gpagespeed. | ||
Update test/test.js with you API key | ||
``` | ||
@@ -26,3 +30,3 @@ $ npm test | ||
##Usage## | ||
##Usage - Module | ||
@@ -49,3 +53,15 @@ Pass an object with properties. | ||
##License## | ||
##Usage - CLI | ||
``` | ||
$ gpagespeed --url=<url> --key=<key> | ||
``` | ||
Optional params. You can see a list of all alternatives on the page for [Google PageSpeed standard query parameters](https://developers.google.com/speed/docs/insights/v1/getting_started#st_params). | ||
``` | ||
$ gpagespeed --url=<url> --key=<key> --callback=<callback> --prettyprint=<true> --userIp=<userIp> --locale=<locale> --strategy=<desktop|mobile> | ||
``` | ||
##License | ||
MIT |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No License Found
License(Experimental) License information could not be found.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
75
63
4427
2
4
1
+ Addedminimist@0.0.8
+ Addedminimist@0.0.8(transitive)