-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve demo extension documentation (#49)
- Loading branch information
Showing
1 changed file
with
25 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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/`. |