Skip to content

Commit 6398334

Browse files
dr-itzyyx990803
authored andcommitted
Document how to test as a Firefox addon w/o signing (#374)
1 parent 957ee53 commit 6398334

File tree

2 files changed

+31
-0
lines changed

2 files changed

+31
-0
lines changed

README.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,36 @@ Works with [vuex](https://github.com/vuejs/vuex) for time-travel debugging:
3838
3. `npm run dev`
3939
4. A plain shell with a test app will be available at `localhost:8080`.
4040

41+
### Testing as Firefox addon
42+
43+
1. Install `web-ext`
44+
45+
~~~~
46+
$ npm install --global web-ext
47+
~~~~
48+
49+
Or, for Yarn:
50+
51+
~~~~
52+
$ yarn global add web-ext
53+
~~~~
54+
55+
Also, make sure `PATH` is set up. Something like this in `~/.bash_profile`:
56+
57+
~~~~
58+
$ PATH=$PATH:$(yarn global bin)
59+
~~~~
60+
61+
2. Build and run in Firefox
62+
63+
~~~~
64+
$ npm run build
65+
$ npm run run:firefox
66+
~~~~
67+
68+
When using Yarn, just replace `npm` with `yarn`.
69+
70+
4171
### License
4272

4373
[MIT](http://opensource.org/licenses/MIT)

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
"lint": "eslint src --ext=js,vue && eslint shells/chrome/src && eslint shells/dev/src && eslint shells/safari/src",
1111
"build": "cd shells/chrome && cross-env NODE_ENV=production webpack --progress --hide-modules",
1212
"build:safari": "cd shells/safari && NODE_ENV=production webpack --progress --hide-modules -p",
13+
"run:firefox": "web-ext run -s shells/chrome -a dist -i src",
1314
"zip": "npm run zip:chrome && npm run zip:firefox",
1415
"zip:chrome": "cd shells && zip -r -FS ../dist/chrome.zip chrome -x *src/* -x *webpack.config.js",
1516
"zip:firefox": "web-ext build -s shells/chrome -a dist -i src",

0 commit comments

Comments
 (0)