npm install @danhartley/emissions
In a node environment e.g. to run an e2e test.
In the browser.
The example takes a URL as an argument on the command line and returns an emissions report. A lighthouse report is optional.
See E2E test for single page emissions
See E2E test that tracks emissions across actions
See Vanilla JS helper function
See React component in TypeScript