add build script

This commit is contained in:
Thomas Rupprecht 2022-12-24 14:00:24 +01:00
parent 0476519e99
commit d898b1ea2a
1 changed files with 2 additions and 1 deletions

View File

@ -11,11 +11,12 @@
"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)'\",/' manifest.json",
"build": "web-ext build -o -i README.md package.json package-lock.json",
"test": "echo \"Error: no test specified\" && exit 0",
"postinstall": "npm run copy-browser-polyfill",
"preversion": "npm test",
"version": "npm run copy-version && git add -u",
"postversion": "web-ext build"
"postversion": "npm run build"
},
"repository": {
"type": "git",