add web-ext-config.js and add watch scripts
This commit is contained in:
parent
39b69904ac
commit
86b3b7ef5e
11
package.json
11
package.json
|
@ -11,11 +11,14 @@
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"copy-browser-polyfill": "cp node_modules/webextension-polyfill/dist/browser-polyfill.js src/browser-polyfill.js",
|
"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",
|
"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/",
|
"lint": "web-ext lint -w",
|
||||||
"prebuild": "cp LICENSE.txt src/",
|
|
||||||
"build": "web-ext build -o -s src/ -n \"_usr_space-{version}.zip\"",
|
|
||||||
"postbuild": "rm src/LICENSE.txt",
|
|
||||||
"test": "echo \"Error: no test specified\" && exit 0",
|
"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",
|
"postinstall": "npm run copy-browser-polyfill",
|
||||||
"preversion": "npm run lint && npm test",
|
"preversion": "npm run lint && npm test",
|
||||||
"version": "npm run copy-version && git add -u",
|
"version": "npm run copy-version && git add -u",
|
||||||
|
|
|
@ -0,0 +1,7 @@
|
||||||
|
module.exports = {
|
||||||
|
sourceDir: 'src/',
|
||||||
|
build: {
|
||||||
|
overwriteDest: true,
|
||||||
|
filename: '_usr_space-{version}.zip',
|
||||||
|
},
|
||||||
|
};
|
Loading…
Reference in New Issue