mirror of
https://github.com/XFox111/PasswordGeneratorExtension.git
synced 2026-04-22 08:08:01 +03:00
Updated Contribution Guidelines (markdown)
+21
-7
@@ -91,15 +91,29 @@ Once you have cloned the repository you can execute following commands:
|
|||||||
> [!TIP]
|
> [!TIP]
|
||||||
> If you use VS Code, you can use pre-defined tasks to run most of required actions (`F1` -> `Tasks: Run Task`)
|
> 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 |
|
```bash
|
||||||
| --- | --- | --- | --- | --- |
|
# Debug
|
||||||
| 1. Install dependencies | `npm install` | N/A | N/A | N/A |
|
npm run dev
|
||||||
| 2. Dev (debug in browser with live updates) | `npm run dev` (Chrome) | `npm run dev:chrome` | `npm run dev:firefox` | `npm run dev:edge` |
|
# Lint
|
||||||
| 3. Build | `npm run build` (Chrome) | `npm run build:chrome` | `npm run build:firefox` | `npm run build:edge` |
|
npm run lint
|
||||||
| 4. Create archive | `npm run zip` (Chrome) | `npm run zip:chrome` | `npm run build:firefox` | - |
|
# 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]
|
> [!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]
|
> [!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.
|
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.
|
||||||
|
|||||||
Reference in New Issue
Block a user