Scodi GreenIT is an analysis module of Scodi, which analyses URLs with GreenIT.
Read more about the description and design of Scodi.
-
Install the package
npm install @scodi/greenit
If you are using Yarn, npm < 7 or PNPM < 8, you also have to install Scodi CLI (which is automatically installed in more recent versions of these packages managers):
npm install @scodi/cli
-
Start an analysis
npx scodi greenit --config '{"url":"https://www.ipcc.ch/"}'OR
npx scodi greenit --config config.json
The analysis configuration follows the JSON format and has the following keys:
If you're using Github, you can simplify the integration of Scodi in your CI scripts by using the Github Action.
The LCA values used by GreenIT to evaluate environmental impacts are not under free license - © Frédéric Bordage
Please also refer to the mentions provided in the code files for specifics on the IP regime.
{ "url": "https://www.ipcc.ch/", // optional - Report language. Default: "en" // possible values: "en", "fr" "language": "fr", // optional - Timeout for an analysis of a URL in ms. Default: 180000 "timeout": 180000, // optional - Number of retry when an analysis of a URL fail. Default: 2 "retry": 2, // optional - Hardware to simulate. Default: "desktop" // possible values: "desktop", "galaxyS9", "galaxyS20", "iPhone8", "iPhone8Plus", "iPhoneX", "iPad" "device": "galaxyS20" }