Skip to content

Commit

Permalink
doc: update
Browse files Browse the repository at this point in the history
  • Loading branch information
hrenaud committed Dec 1, 2023
1 parent 3704de6 commit 9abd816
Show file tree
Hide file tree
Showing 2 changed files with 76 additions and 7 deletions.
10 changes: 5 additions & 5 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 <url> <options>`.
- Avec [Lighthouse CI](https://github.com/GoogleChrome/lighthouse-ci#readme) ;

Afin d'obtenir avec notre cli `npx lighthouse-ecoindex <command> <options>` 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

Expand All @@ -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/)
73 changes: 71 additions & 2 deletions docs/guides/1-lighthouse-ecoindex-cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 <command> <options>
```

## Utilisation

```bash
npx lighthouse-ecoindex <command> <options>
```

**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

0 comments on commit 9abd816

Please sign in to comment.