From d74a8b13ac480417a8762096fcd5e5a273013142 Mon Sep 17 00:00:00 2001 From: Eugene Fox Date: Tue, 24 Sep 2024 20:35:32 +0300 Subject: [PATCH] Updated Contribution Guidelines (markdown) --- Contribution-Guidelines.md | 28 +++++++++++++++++++++------- 1 file changed, 21 insertions(+), 7 deletions(-) diff --git a/Contribution-Guidelines.md b/Contribution-Guidelines.md index 3447dd0..c4fc762 100644 --- a/Contribution-Guidelines.md +++ b/Contribution-Guidelines.md @@ -91,15 +91,29 @@ Once you have cloned the repository you can execute following commands: > [!TIP] > If you use VS Code, you can use pre-defined tasks to run most of required actions (`F1` -> `Tasks: Run Task`) -| Name | Default | Chrome | Firefox | Edge | -| --- | --- | --- | --- | --- | -| 1. Install dependencies | `npm install` | N/A | N/A | N/A | -| 2. Dev (debug in browser with live updates) | `npm run dev` (Chrome) | `npm run dev:chrome` | `npm run dev:firefox` | `npm run dev:edge` | -| 3. Build | `npm run build` (Chrome) | `npm run build:chrome` | `npm run build:firefox` | `npm run build:edge` | -| 4. Create archive | `npm run zip` (Chrome) | `npm run zip:chrome` | `npm run build:firefox` | - | +```bash +# Debug +npm run dev +# Lint +npm run lint +# Build +npm run build +# Pack +npm run zip +``` + +> [!NOTE] +For `build` and `zip` tasks `npm run lint` executes automatically. + +By default, all actions are done for Chrome browser. If you want to use another browser (e.g. Firefox), add `-b` option to the command: + +```bash +npm run dev -- -b edge +npm run zip -- -b firefox +``` > [!CAUTION] -`npm run dev:firefox` uses MV2 which is incompatible with some of used APIs (e.g. `browser.action`). When testing on Firefox it is recommended to use `npm run build:firefox` and then sideloading the extension. +`npm run dev -- -b firefox` uses MV2 which is incompatible with some of used APIs (e.g. `browser.action`). When testing on Firefox it is recommended to build and sideload the extension, instead of running it in dev mode. > [!IMPORTANT] Before debugging, you may need to set your browser binaries location, or otherwise configure debugging environment. Please refer to [web-ext.config.ts](https://wxt.dev/guide/directory-structure/web-ext-config.html) of the WXT framework for more details.