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": {
|
||||
"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",
|
||||
|
|
|
@ -0,0 +1,7 @@
|
|||
module.exports = {
|
||||
sourceDir: 'src/',
|
||||
build: {
|
||||
overwriteDest: true,
|
||||
filename: '_usr_space-{version}.zip',
|
||||
},
|
||||
};
|
Loading…
Reference in New Issue