diff --git a/docs/README.md b/docs/README.md index 02b56e80..0804274a 100644 --- a/docs/README.md +++ b/docs/README.md @@ -8,8 +8,6 @@ order: 900 # Plugin [Ecoindex](https://www.ecoindex.fr) pour [Lighthouse](https://developers.google.com/web/tools/lighthouse) -![](./static/logo-asso-greenit.svg) - ![npm](https://img.shields.io/npm/v/lighthouse-plugin-ecoindex) ![GitHub License](https://img.shields.io/github/license/NovaGaia/lighthouse-plugin-ecoindex) ## Introduction @@ -22,9 +20,10 @@ Il peut être utilisé de trois manières différentes : - Avec [Lighthouse cli](https://github.com/GoogleChrome/lighthouse#using-the-node-cli) `npm lighthouse `. - Avec [Lighthouse CI](https://github.com/GoogleChrome/lighthouse-ci#readme) ; -Afin d'obtenir avec notre cli `npx lighthouse-ecoindex ` et des rapports HTML, JSON ou la Déclaration Environnementale de votre site – Environmental Impact Statement (EIS) – de GreenIT.fr (c) +Afin d'obtenir : -Ou pour afficher ces résultats dans votre CI/CD ou un serveur Lighthouse. +- Des rapports HTML, JSON ou la Déclaration Environnementale de votre site – Environmental Impact Statement (EIS) – de GreenIT.fr® +- Ajouter ces résultats dans votre CI/CD ou un à serveur Lighthouse. ## Récapitulatif des fonctionnalités @@ -46,4 +45,5 @@ Ou pour afficher ces résultats dans votre CI/CD ou un serveur Lighthouse. [!ref `lighthouse-ci`](/guides/3-lighthouse-ci.md) ![Details of plugin results](./ecoindex-results.png) -_Details of plugin results_ + +[![](./static/logo-asso-greenit.svg "Aller sur le site de l'association")](https://asso.greenit.fr/) diff --git a/docs/guides/1-lighthouse-ecoindex-cli.md b/docs/guides/1-lighthouse-ecoindex-cli.md index 27f443f2..506a46bc 100644 --- a/docs/guides/1-lighthouse-ecoindex-cli.md +++ b/docs/guides/1-lighthouse-ecoindex-cli.md @@ -8,21 +8,90 @@ order: 300 ## Objectifs -Cet permet, au travers de Lighthouse, d'obtenir des rapports d'audits Green IT de votre site web. Cela pour : +Cet utilitaire en ligne de commande (cli) permet, au travers de Lighthouse, d'obtenir des rapports d'audits Green IT de votre site web. Cela pour : - des parcours (1 parcours = 1 liste d'URL) via un fichier JSON ; - une liste d'URLs ; - une URL unique. -Lors de son utilisations, vous obtiendrez : +A la sortie, vous obtiendrez : - Des rapports d'audits Lighthouse avec les audits EcoIndex et les bonnes pratiques, au format HTML et/ou JSON ; - Une Déclaration Environnementale de votre site – Environmental Impact Statement (EIS) – de GreenIT.fr® au format JSON, HTML et Markdown. ## Installation +Il n'est pas nécessaire d'installer le plugin `lighthouse-plugin-ecoindex` pour l'utiliser. Il est possible de l'utiliser directement avec `npx` : + +```bash +npx lighthouse-ecoindex +``` + ## Utilisation +```bash +npx lighthouse-ecoindex +``` + +**Commandes :** + ++++ collect + +```text +Run Lighthouse and save the results to a local folder. + +Options: + --help Show help [boolean] + --version Show version number [boolean] + -d, --demo Use demo URLs. [boolean] [default: false] + -u, --url URL to process, supports multiple values [array] + -j, --json-file Structured file, must respect a schema (see documentatio + n). [string] + -h, --extra-header Extra object config for Lighthouse. JSON string or path + to a JSON file. [string] [default: null] + -p, --output-path Output folder. [string] [default: "./reports"] + -o, --output Reporter for the results, supports multiple values. choi + ces: "json", "html", "statement". WARN: "csv" is not ava + lailable with flow. [string] [default: ["html"]] + -a, --audit-category Audit to run, supports multiple values. + [array] [default: ["performance","seo","accessibility","best-practices","light + house-plugin-ecoindex"]] + +Examples: + lighthouse-ecoindex collect --demo Generates a report for the demo URLs + . + lighthouse-ecoindex collect --json-file Generates multiples reports for mult + ./input-file.json iples courses. + lighthouse-ecoindex collect --url https: Generates multiples reports for mult + //ecoindex.fr/ iples courses. + +For more information on this Lighthouse Ecoindex script helper, see https://gith +ub.com/cnumr/lighthouse-plugin-ecoindex#readme +``` + ++++ convert + +```text +Convert JSON report(s) generated by `lighthouse-ecoindex` to Environmental State +ment file. + +Options: + --help Show help [boolean] + --version Show version number [boolean] + -i, --input-report JSON file generate by `lighthouse-ecoindex`. [array] + -p, --output-path Output folder. [string] [default: "./reports"] + +Examples: + lighthouse-ecoindex convert --input-repo Convert JSON report(s) generated by + rt ./lh-export-1.json --input-report ./l `lighthouse-ecoindex` to Environment + h-export-2.json al Statement file. + +For more information on this Lighthouse Ecoindex script helper, see https://gith +ub.com/cnumr/lighthouse-plugin-ecoindex#readme +``` + ++++ + ## Options ## Exemples