1
0
mirror of https://github.com/XFox111/PasswordGeneratorExtension.git synced 2026-04-22 08:08:01 +03:00

Updated Contribution Guidelines (markdown)

Eugene Fox
2024-09-24 20:35:32 +03:00
parent f6c57d411f
commit d74a8b13ac
+21 -7
@@ -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.