Compare commits
2 commits
39b69904ac
...
9740fc47a7
Author | SHA1 | Date | |
---|---|---|---|
9740fc47a7 | |||
86b3b7ef5e |
28
README.md
28
README.md
|
@ -10,20 +10,32 @@
|
|||
## Install
|
||||
```ssh
|
||||
$ git clone https://gitea.usrspace.at/XimeX/usrspace-browser-addon.git
|
||||
$ npm install -g web-ext
|
||||
$ npm install
|
||||
$ npm i -g web-ext
|
||||
$ npm i
|
||||
```
|
||||
|
||||
- Open `about:debugging` or `about:debugging-new` in Firefox
|
||||
- Click `Load Temporary Add-on...`
|
||||
- Navigate to Add-on Repository
|
||||
- Open `manifest.json`
|
||||
- Use it
|
||||
## Run / Develop / Debug
|
||||
```ssh
|
||||
$ npm run watch:{firefox|firefox-android|chromium}
|
||||
```
|
||||
|
||||
If more options are needed add them after a `--`.
|
||||
|
||||
Some useful options:
|
||||
- `--devtools`
|
||||
- `--firefox-apk=...`
|
||||
- `--android-device=...`
|
||||
|
||||
Example: `npm run watch:firefox-android -- --firefox-apk=org.mozilla.fenix --firefox-device=XXXXXXXX`.
|
||||
|
||||
## Build
|
||||
```ssh
|
||||
$ npm run build
|
||||
```
|
||||
|
||||
## Release
|
||||
```ssh
|
||||
$ npm version {major|minor|patch|...}
|
||||
$ web-ext build
|
||||
```
|
||||
|
||||
## Credits
|
||||
|
|
11
package.json
11
package.json
|
@ -11,11 +11,14 @@
|
|||
"scripts": {
|
||||
"copy-browser-polyfill": "cp node_modules/webextension-polyfill/dist/browser-polyfill.js src/browser-polyfill.js",
|
||||
"copy-version": "sed -i 's/^\t\"version\": \".*\",$/\t\"version\": \"'$(rg '^\t\"version\": \"(.+)\",$' -r '$1' < package.json)'\",/' src/manifest.json",
|
||||
"lint": "web-ext lint -w -s src/",
|
||||
"prebuild": "cp LICENSE.txt src/",
|
||||
"build": "web-ext build -o -s src/ -n \"_usr_space-{version}.zip\"",
|
||||
"postbuild": "rm src/LICENSE.txt",
|
||||
"lint": "web-ext lint -w",
|
||||
"test": "echo \"Error: no test specified\" && exit 0",
|
||||
"watch:firefox": "web-ext run -t firefox-desktop",
|
||||
"watch:firefox-android": "web-ext run -t firefox-android",
|
||||
"watch:chromium": "web-ext run -t chromium",
|
||||
"prebuild": "cp LICENSE.txt src/",
|
||||
"build": "web-ext build",
|
||||
"postbuild": "rm src/LICENSE.txt",
|
||||
"postinstall": "npm run copy-browser-polyfill",
|
||||
"preversion": "npm run lint && npm test",
|
||||
"version": "npm run copy-version && git add -u",
|
||||
|
|
7
web-ext-config.js
Normal file
7
web-ext-config.js
Normal file
|
@ -0,0 +1,7 @@
|
|||
module.exports = {
|
||||
sourceDir: 'src/',
|
||||
build: {
|
||||
overwriteDest: true,
|
||||
filename: '_usr_space-{version}.zip',
|
||||
},
|
||||
};
|
Loading…
Reference in a new issue