From 4c1bc03fe29e85b85618b39fb88e9e8fea7f570c Mon Sep 17 00:00:00 2001 From: Bastien Gatellier Date: Sat, 5 Aug 2023 03:09:09 +0200 Subject: [PATCH] docs: simplify the installation step for recent packages managers --- modules/api/README.md | 10 ++++++++-- modules/bigquery/README.md | 10 ++++++++-- modules/greenit/README.md | 10 ++++++++-- modules/lighthouse/README.md | 14 +++++++++----- modules/mysql/README.md | 10 ++++++++-- modules/observatory/README.md | 10 ++++++++-- modules/slack/README.md | 10 ++++++++-- modules/ssllabs-server/README.md | 10 ++++++++-- 8 files changed, 65 insertions(+), 19 deletions(-) diff --git a/modules/api/README.md b/modules/api/README.md index f2528ad9..082de628 100644 --- a/modules/api/README.md +++ b/modules/api/README.md @@ -8,10 +8,16 @@ Read more about [the description and design of _Heart_](https://github.com/faber # Usage -1. Install the package, _[Heart CLI](https://www.npmjs.com/package/@fabernovel/heart-cli)_ and an _analysis_ module, for example _[Heart GreenIT](https://www.npmjs.com/package/@fabernovel/heart-greenit)_ +1. Install the package and an _analysis_ module, for example _[Heart GreenIT](https://www.npmjs.com/package/@fabernovel/heart-greenit)_ ```bash - npm install @fabernovel/heart-cli @fabernovel/heart-api @fabernovel/heart-greenit + npm install @fabernovel/heart-api @fabernovel/heart-greenit + ``` + + If you are using Yarn, npm < 7 or PNPM < 8 as package manager, you also have to install _[Heart CLI](https://www.npmjs.com/package/@fabernovel/heart-cli)_ (which is automatically installed if you have more recent versions): + + ```bash + npm install @fabernovel/heart-cli ``` 2. Start the server diff --git a/modules/bigquery/README.md b/modules/bigquery/README.md index 4ca8b067..36976657 100644 --- a/modules/bigquery/README.md +++ b/modules/bigquery/README.md @@ -10,10 +10,16 @@ Read more about [the description and design of _Heart_](https://github.com/faber ## Standalone -1. Install the package, _[Heart CLI](https://www.npmjs.com/package/@fabernovel/heart-cli)_ and an _analysis_ module, for example _[Heart GreenIT](https://www.npmjs.com/package/@fabernovel/heart-greenit)_ +1. Install the package and an _analysis_ module, for example _[Heart GreenIT](https://www.npmjs.com/package/@fabernovel/heart-greenit)_ ```bash - npm install @fabernovel/heart-cli @fabernovel/heart-bigquery @fabernovel/heart-greenit + npm install @fabernovel/heart-bigquery @fabernovel/heart-greenit + ``` + + If you are using Yarn, npm < 7 or PNPM < 8 as package manager, you also have to install _[Heart CLI](https://www.npmjs.com/package/@fabernovel/heart-cli)_ (which is automatically installed if you have more recent versions): + + ```bash + npm install @fabernovel/heart-cli ``` 2. In the project root folder, create a `.env` file with the [_Google Service accounts_](https://cloud.google.com/docs/authentication/getting-started#creating_a_service_account) credentials (you can use [Code Beautify](https://codebeautify.org/remove-extra-spaces) to remove whitespaces) diff --git a/modules/greenit/README.md b/modules/greenit/README.md index 387244f3..eddbdc52 100644 --- a/modules/greenit/README.md +++ b/modules/greenit/README.md @@ -8,10 +8,16 @@ Read more about [the description and design of _Heart_](https://github.com/faber ## Standalone -1. Install the package and _[Heart CLI](https://www.npmjs.com/package/@fabernovel/heart-cli)_ +1. Install the package ```bash - npm install @fabernovel/heart-cli @fabernovel/heart-greenit + npm install @fabernovel/heart-greenit + ``` + + If you are using Yarn, npm < 7 or PNPM < 8 as package manager, you also have to install _[Heart CLI](https://www.npmjs.com/package/@fabernovel/heart-cli)_ (which is automatically installed if you have more recent versions): + + ```bash + npm install @fabernovel/heart-cli ``` 2. Start an analysis diff --git a/modules/lighthouse/README.md b/modules/lighthouse/README.md index 0d0a6d01..c1604fde 100644 --- a/modules/lighthouse/README.md +++ b/modules/lighthouse/README.md @@ -8,15 +8,19 @@ Read more about [the description and design of _Heart_](https://github.com/faber ## Standalone -1. Install _Google Chrome_, as _Google Lighthouse_ relies on it to analyze a web page +1. Install the package -2. Install the package and _[Heart CLI](https://www.npmjs.com/package/@fabernovel/heart-cli)_ + ```bash + npm install @fabernovel/heart-lighthouse + ``` + + If you are using Yarn, npm < 7 or PNPM < 8 as package manager, you also have to install _[Heart CLI](https://www.npmjs.com/package/@fabernovel/heart-cli)_ (which is automatically installed if you have more recent versions): ```bash - npm install @fabernovel/heart-cli @fabernovel/heart-lighthouse + npm install @fabernovel/heart-cli ``` -3. Start an analysis +2. Start an analysis ```bash npx heart lighthouse --config '{"url":"https://heart.fabernovel.com"}' @@ -25,7 +29,7 @@ Read more about [the description and design of _Heart_](https://github.com/faber OR ```bash - npx heart lighthouse --file configuration.json + npx heart lighthouse --config desktop.json ``` The analysis configuration follows the JSON format and has the following keys: diff --git a/modules/mysql/README.md b/modules/mysql/README.md index 0397c8c1..c48fec78 100644 --- a/modules/mysql/README.md +++ b/modules/mysql/README.md @@ -10,10 +10,16 @@ Read more about [the description and design of _Heart_](https://github.com/faber ## Standalone -1. Install the package, _[Heart CLI](https://www.npmjs.com/package/@fabernovel/heart-cli)_ and an _analysis_ module, for example _[Heart GreenIT](https://www.npmjs.com/package/@fabernovel/heart-greenit)_ +1. Install the package and an _analysis_ module, for example _[Heart GreenIT](https://www.npmjs.com/package/@fabernovel/heart-greenit)_ ```bash - npm install @fabernovel/heart-cli @fabernovel/heart-greenit @fabernovel/heart-mysql + npm install @fabernovel/heart-greenit @fabernovel/heart-mysql + ``` + + If you are using Yarn, npm < 7 or PNPM < 8 as package manager, you also have to install _[Heart CLI](https://www.npmjs.com/package/@fabernovel/heart-cli)_ (which is automatically installed if you have more recent versions): + + ```bash + npm install @fabernovel/heart-cli ``` 2. In the project root folder, create a `.env` file with the database connection information set as a URL diff --git a/modules/observatory/README.md b/modules/observatory/README.md index 8bff396d..debd4388 100644 --- a/modules/observatory/README.md +++ b/modules/observatory/README.md @@ -8,10 +8,16 @@ Read more about [the description and design of _Heart_](https://github.com/faber ## Standalone -1. Install the package and _[Heart CLI](https://www.npmjs.com/package/@fabernovel/heart-cli)_ +1. Install the package ```bash - npm install @fabernovel/heart-cli @fabernovel/heart-observatory + npm install @fabernovel/heart-observatory + ``` + + If you are using Yarn, npm < 7 or PNPM < 8 as package manager, you also have to install _[Heart CLI](https://www.npmjs.com/package/@fabernovel/heart-cli)_ (which is automatically installed if you have more recent versions): + + ```bash + npm install @fabernovel/heart-cli ``` 2. [Optional] Customize the _Mozilla Observatory_ scanner diff --git a/modules/slack/README.md b/modules/slack/README.md index 076aac9e..e61805d5 100644 --- a/modules/slack/README.md +++ b/modules/slack/README.md @@ -10,10 +10,16 @@ Read more about [the description and design of _Heart_](https://github.com/faber ## Standalone -1. Install the package, _[Heart CLI](https://www.npmjs.com/package/@fabernovel/heart-cli)_ and an _analysis_ module, for example _[Heart GreenIT](https://www.npmjs.com/package/@fabernovel/heart-greenit)_ +1. Install the package and an _analysis_ module, for example _[Heart GreenIT](https://www.npmjs.com/package/@fabernovel/heart-greenit)_ ```bash - npm install @fabernovel/heart-cli @fabernovel/heart-greenit @fabernovel/heart-slack + npm install @fabernovel/heart-greenit @fabernovel/heart-slack + ``` + + If you are using Yarn, npm < 7 or PNPM < 8 as package manager, you also have to install _[Heart CLI](https://www.npmjs.com/package/@fabernovel/heart-cli)_ (which is automatically installed if you have more recent versions): + + ```bash + npm install @fabernovel/heart-cli ``` 2. In the project root folder, create a `.env` file with the Slack API token diff --git a/modules/ssllabs-server/README.md b/modules/ssllabs-server/README.md index dfe4842c..621736e2 100644 --- a/modules/ssllabs-server/README.md +++ b/modules/ssllabs-server/README.md @@ -8,10 +8,16 @@ Read more about [the purpose, design and general installation of _Heart_](https: ## Standalone -1. Install the package and _[Heart CLI](https://www.npmjs.com/package/@fabernovel/heart-cli)_ +1. Install the package ```bash - npm install @fabernovel/heart-cli @fabernovel/heart-ssllabs-server + npm install @fabernovel/heart-ssllabs-server + ``` + + If you are using Yarn, npm < 7 or PNPM < 8 as package manager, you also have to install _[Heart CLI](https://www.npmjs.com/package/@fabernovel/heart-cli)_ (which is automatically installed if you have more recent versions): + + ```bash + npm install @fabernovel/heart-cli ``` 2. Start an analysis