sitespeedio / coach

Clear Eyes. Full Hearts. Can’t Lose.
MIT License
1.21k stars 64 forks source link

Added flag to run() to return the HAR as JSON in the advice array #323

Closed jadonn closed 4 years ago

jadonn commented 5 years ago

Your checklist for this pull request

Please review the guidelines for contributing to this repository.

Description

Please describe your pull request and tell us the fix # I currently use the Coach programmatically and display the results for a given analyzed web page. I would like to be able to use and to display the HAR data as well. It seems like that would be a useful thing for me to be able to do. When running the coach programmatically, passing true as the 5th param will make the HAR part of the advice if the HAR was in the result from runBrowserTime(). If the HAR data is not available, the advice is returned without the HAR data.

I do think the Coach is a great tool! I have really enjoyed using it. I wanted to give this bit of functionality back in case it might be something useful to others using the Coach programmatically.

soulgalore commented 5 years ago

Hi @jadonn thanks for the PR, I've been away the whole week but back now and will look at the backlog if things during the weekend.

Best Peter