add build script

This commit is contained in:
Thomas Rupprecht 2022-12-24 14:00:24 +01:00
parent 0476519e99
commit d898b1ea2a

View file

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