From d41aeef2db5189d318615e1a0cab6bbf6efd4b76 Mon Sep 17 00:00:00 2001 From: Sebastian Blask Date: Sun, 3 Mar 2024 00:47:26 +1300 Subject: [PATCH] refactor: cleanup package.json --- package.json | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) diff --git a/package.json b/package.json index ef641e8..c12080e 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,4 @@ { - "author": "Sebastian Blask", "devDependencies": { "@commitlint/cli": "^19.0.3", "@commitlint/config-angular": "^19.0.3", @@ -8,30 +7,19 @@ "eslint": "^8.54.0", "web-ext": "^7.8.0" }, - "license": "MIT", - "name": "donotclosebrowserwithlasttab", - "repository": { - "type": "git", - "url": "https://github.com/sblask/webextension-do-not-close-browser-with-last-tab" - }, + "name": "webextension-do-not-close-browser-with-last-tab", + "private": true, "scripts": { "artifact-create:chrome": "web-ext build --artifacts-dir . --ignore-files screenshots package.json icon.fodg", "artifact-create:firefox": "web-ext build --artifacts-dir . --ignore-files screenshots package.json icon.fodg *.png browser-polyfill.js", "artifact-rename:chrome": "VERSION=$(jq --raw-output '.version' manifest.json); rename \"s/.zip$/-chrome.zip/\" *$VERSION.zip", "artifact-rename:firefox": "VERSION=$(jq --raw-output '.version' manifest.json); rename \"s/.zip$/-firefox.zip/\" *$VERSION.zip", "build": "git add --all; rm *.zip; npm run modify:chrome && npm run artifact-create:chrome && npm run artifact-rename:chrome && git checkout -- . && npm run modify:firefox && npm run artifact-create:firefox && npm run artifact-rename:firefox && git checkout -- .", - "help": "web-ext --help", "icons": "for size in 16x16 32x32 48x48 64x64 128x128 440x280; do convert -background none -density 1000 -resize ${size} -extent ${size} -gravity center icon.svg icon-${size}.png; done", - "lint": "eslint --debug $(find . -not -path '*node_modules*' -name '*.js')", "modify:chrome": "jq --indent 4 '. | del(.applications) | del(.browser_action.default_icon)' manifest.json | sponge manifest.json", "modify:firefox": "npm run modify:manifest:firefox && npm run modify:remove-polyfill-references", "modify:manifest:firefox": "jq --indent 4 '. | .background.scripts |= map(select(. != \"browser-polyfill.js\")) | if has(\"icons\") then .icons |= {\"48\": \"icon.svg\"} else . end | del(.options_ui.open_in_tab)' manifest.json | sponge manifest.json", - "modify:remove-polyfill-references": "sed --in-place --regexp-extended '/\"(\\.\\.\\/)?browser-polyfill.js\"/d' $(find . -not -path '*node_modules*' -name '*.js' -o -name '*.html')", - "readme": "cat README.md | sed -r 's/\\[.+\\]\\((.+)\\)/\\1/' | sed -r '/\\[/{ N; s/\\[.+\\]\\((.+)\\)/\\n\\1/ }' | sed -r '/```/,/```/d' | vim -", - "release": "VERSION=$(jq --raw-output '.version' manifest.json); hub release create $(for file in *$VERSION*.zip; do echo \" -a ${file} \"; done) -m $VERSION $VERSION", - "start": "GTK_THEME=Greybird web-ext run --verbose --firefox firefox", - "start:nightly": "GTK_THEME=Greybird web-ext run --verbose --firefox firefox-trunk" + "modify:remove-polyfill-references": "sed --in-place --regexp-extended '/\"(\\.\\.\\/)?browser-polyfill.js\"/d' $(find . -not -path '*node_modules*' -name '*.js' -o -name '*.html')" }, - "title": "Do not close browser with last tab", "version": "1.0.0" }