Skip to content

Commit

Permalink
Improve demo extension documentation (#49)
Browse files Browse the repository at this point in the history
  • Loading branch information
aspiers authored Jun 11, 2024
1 parent ddedc78 commit 1e8a4c7
Showing 1 changed file with 25 additions and 4 deletions.
29 changes: 25 additions & 4 deletions demo/readme.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,36 @@
Demo/test extension for `webext-permission-toggle`
# Demo/test extension for `webext-permission-toggle`

Run these 3 commands simultaneusly to manually test the module:
First install `web-ext` globally:

```sh
npm i -g web-ext
```

To manually test the module, first run this the top-level directory of
the repo:

```sh
npm run watch
```

Now leave that running and simultaneously run the following, which
will run parcel to build the `mv2` and `mv3` targets defined in
`package.json`:

```sh
cd manual-test npm run watch
npm run demo:watch
```

Now you can launch various browser test combinations, e.g.

```sh
web-ext run # Install it globally first
web-ext run -s dist/mv2 -t firefox-desktop
web-ext run -s dist/mv3 -t chromium
```

Note that `package.json` specifies a default `web-ext` source
directory of `dist/mv3`.

In Chrome and Chromium, in order to view the background worker console
debug messages, you'll need to enable Developer mode in
`chrome://extensions/`.

0 comments on commit 1e8a4c7

Please sign in to comment.