Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/common use cases #114

Merged
merged 29 commits into from
Apr 6, 2020
Merged
Changes from 28 commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
39472ab
Added nyc for testint coverage
JuanMaRuiz Oct 26, 2019
1f65651
Added index test
JuanMaRuiz Oct 26, 2019
e95fe41
Added test to check handleOpts method in index file
JuanMaRuiz Oct 27, 2019
da5adc1
Merge branch 'master' of https://github.com/JuanMaRuiz/psi into featu…
JuanMaRuiz Nov 8, 2019
57fd768
Tests improvements
JuanMaRuiz Nov 8, 2019
f8e7cc7
Added test for threshold
JuanMaRuiz Nov 9, 2019
21a1561
Updated some npm dependencies
JuanMaRuiz Nov 9, 2019
ffb8741
Optimizing unit tests
JuanMaRuiz Nov 9, 2019
695a877
Removed commented tests
JuanMaRuiz Nov 19, 2019
1930431
Merge branch 'feature-optimizing-test' of https://github.com/JuanMaRu…
JuanMaRuiz Nov 19, 2019
a05bdfa
Update test/index.test.js
JuanMaRuiz Nov 21, 2019
6a37baa
Update test/output.test.js
JuanMaRuiz Nov 21, 2019
862aa58
Reverted api-response.test
JuanMaRuiz Nov 21, 2019
6ed67cb
Reverted googleapis npm dependency to previous verison
JuanMaRuiz Nov 21, 2019
94fe536
Added proposed change of test definition
JuanMaRuiz Nov 25, 2019
8e8ab81
Revert unnecessary change
JuanMaRuiz Nov 25, 2019
22c9e77
Moved optionsHandler and getTreshold to options-handler. Removed rewi…
JuanMaRuiz Nov 26, 2019
3b56a1a
Moved getReporter to options-handler
JuanMaRuiz Nov 27, 2019
dbda724
Merge branch 'master' of https://github.com/GoogleChromeLabs/psi
JuanMaRuiz Nov 27, 2019
31bbc65
Merge branch 'master' of https://github.com/GoogleChromeLabs/psi
JuanMaRuiz Nov 28, 2019
d546d6c
Merge branch 'master' of https://github.com/JuanMaRuiz/psi
JuanMaRuiz Nov 28, 2019
31473da
Merge branch 'master' of https://github.com/GoogleChromeLabs/psi
JuanMaRuiz Mar 10, 2020
f0abcc6
Merge branch 'master' of https://github.com/GoogleChromeLabs/psi
JuanMaRuiz Mar 14, 2020
54dd8ea
Merge branch 'master' of https://github.com/GoogleChromeLabs/psi
JuanMaRuiz Mar 15, 2020
4668585
Merge branch 'master' of https://github.com/JuanMaRuiz/psi
JuanMaRuiz Mar 15, 2020
2204ebf
Merge branch 'master' of https://github.com/GoogleChromeLabs/psi
JuanMaRuiz Mar 16, 2020
fb30e17
Merge branch 'master' of https://github.com/JuanMaRuiz/psi
JuanMaRuiz Mar 16, 2020
bb3891b
Add section with common use cases to README
JuanMaRuiz Mar 17, 2020
a8d71ed
Wording corrections
JuanMaRuiz Mar 19, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 20 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,15 +118,34 @@ $ psi --help
$ psi https://addyosmani.com --strategy=mobile
```

## Common Use cases

## Getting PSI into your build process
<details>
<summary>Getting PSI into your build process.</summary><br>

A sample [Gulp](https://github.com/addyosmani/psi-gulp-sample) project using PSI is available.

If you use Grunt, [`grunt-pagespeed`](https://github.com/jrcryer/grunt-pagespeed) is a task by James Cryer that uses PSI under the hood.

For testing local projects, we recommend using [`psi-ngrok`](https://github.com/denar90/psi-ngrok) or [`ngrok`](http://www.jamescryer.com/2014/06/12/grunt-pagespeed-and-ngrok-locally-testing/).
</details>

<details>
<summary>Getting filmstrips</summary>

**Filmstrips** are returned by v5 but psi tool is not exposing that data. If you want to get **filmstrips** you can create a file that require `psi` tool and get the specific data from the `audits` object:
JuanMaRuiz marked this conversation as resolved.
Show resolved Hide resolved

```javascript
const psi = require('psi');

(async () => {
// Get the PageSpeed Insights report
const {data} = await psi('https://theverge.com');
console.log(data.lighthouseResult.audits['screenshot-thumbnails'].details.items);
})();
```

</details>

## License

Expand Down