sitespeed.io
sitespeed.io copied to clipboard
Retrieve a run context inside a pre/post script
Feature/improvement
According to the fact that a pre/post-script runs for each URL, it would be useful to have the ability to retrieve the context of the run, such as the URL. My real-life example is that I have logic in a pre-script with try-catch, and there's no way to log details about which specific URL the error occurred on.
fileWithUrls.txt:
https://www.sitespeed.io/
https://www.sitespeed.io/examples/
https://www.sitespeed.io/documentation/
https://www.sitespeed.io/blog/
Command for run:
sitespeed.io --target fileWithUrls.txt --preScript someScript.mjs