Skip to content

Commit 1e8a4c7

Browse files
authored
Improve demo extension documentation (#49)
1 parent ddedc78 commit 1e8a4c7

File tree

1 file changed

+25
-4
lines changed

1 file changed

+25
-4
lines changed

demo/readme.md

Lines changed: 25 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,36 @@
1-
Demo/test extension for `webext-permission-toggle`
1+
# Demo/test extension for `webext-permission-toggle`
22

3-
Run these 3 commands simultaneusly to manually test the module:
3+
First install `web-ext` globally:
4+
5+
```sh
6+
npm i -g web-ext
7+
```
8+
9+
To manually test the module, first run this the top-level directory of
10+
the repo:
411

512
```sh
613
npm run watch
714
```
815

16+
Now leave that running and simultaneously run the following, which
17+
will run parcel to build the `mv2` and `mv3` targets defined in
18+
`package.json`:
19+
920
```sh
10-
cd manual-test npm run watch
21+
npm run demo:watch
1122
```
1223

24+
Now you can launch various browser test combinations, e.g.
25+
1326
```sh
14-
web-ext run # Install it globally first
27+
web-ext run -s dist/mv2 -t firefox-desktop
28+
web-ext run -s dist/mv3 -t chromium
1529
```
30+
31+
Note that `package.json` specifies a default `web-ext` source
32+
directory of `dist/mv3`.
33+
34+
In Chrome and Chromium, in order to view the background worker console
35+
debug messages, you'll need to enable Developer mode in
36+
`chrome://extensions/`.

0 commit comments

Comments
 (0)