Files
BewlyBewly/package.json
Hakadao 9932c77762 chore: support safari (hmmm, i guess?) (#960)
* Add support of Safari

1. Workaround of Safari's bug of not sending cookies when using fetch in background service worker. This fixes https://github.com/hakadao/BewlyBewly/issues/275#issuecomment-1927278492. See: https://stackoverflow.com/questions/78239213/safari-extension-service-worker-not-sending-cookie
2. Add scripts to for Safari specific build and convert it to a Safari web extension.

* Fixed a bug in Safari that when the extension was installed, the page would turn into a white screen

* Safari may fire DOMContentLoaded before the codes get called

* Remove false fix; Ignore extension-safari

* Reduce memory and power usage with a nonpersistent background page on Safari and Firefox, see https://developer.apple.com/documentation/safariservices/safari_web_extensions/optimizing_your_web_extension_for_safari#3743241 and https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/Background_scripts

* Build and release Safari extension with Github actions (#585)

* feat: add safari extension build

* fix: safari pathname

* fix: add build branch

* Merge

* Try building Safari extension using GitHub action

Correct versions

Debug

Minor bug fixed

Minor bug fixed

Add scripts to release

Minor bug fixed

Minor bug fixed

Minor bug fixed

---------

Co-authored-by: 梦念逍遥 <2589141604@qq.com>
Co-authored-by: Xiaolin Wang <exgphe@gmail.com>
Co-authored-by: Hakadao <a578457889743@gmail.com>

* fix: safari build (#665)

* chore: update

* chore: update knip.json to ignore "xcrun" binaries

---------

Co-authored-by: Xiaolin Wang <exgphe@gmail.com>
Co-authored-by: exgphe <14009450+exgphe@users.noreply.github.com>
Co-authored-by: 梦念逍遥 <2589141604@qq.com>
2024-08-14 00:24:09 +08:00

122 lines
4.6 KiB
JSON

{
"name": "bewly-bewly",
"displayName": "BewlyBewly",
"type": "module",
"version": "0.27.4",
"private": true,
"packageManager": "pnpm@9.5.0",
"description": "Just make a few small changes to your Bilibili homepage.",
"homepage": "https://github.com/hakadao/BewlyBewly",
"scripts": {
"dev": "npm run clear && cross-env NODE_ENV=development run-p dev:*",
"dev-firefox": "npm run clear-firefox && cross-env NODE_ENV=development FIREFOX=true run-p dev:*",
"dev:prepare": "esno scripts/prepare.ts",
"dev:web": "vite",
"dev:js": "npm run build:js -- --mode development",
"dev:bg": "tsup --watch ./src",
"build": "cross-env NODE_ENV=production run-s clear build:web build:prepare build:js build:bg",
"build-firefox": "cross-env NODE_ENV=production FIREFOX=true run-s clear-firefox build:web build:prepare build:js build:bg",
"build-safari": "cross-env NODE_ENV=production SAFARI=true run-s clear-safari build:web build:prepare build:js build:bg",
"build:prepare": "esno scripts/prepare.ts",
"build:web": "vite build",
"build:js": "vite build --config vite.config.content.ts",
"build:bg": "tsup",
"convert-safari": "xcrun safari-web-extension-converter ./extension-safari --project-location ./extension-safari-macos --macos-only",
"pack": "cross-env NODE_ENV=production run-p pack:*",
"pack:zip": "rimraf extension.zip && jszip-cli add extension/* -o ./extension.zip",
"pack:zip-firefox": "rimraf extension-firefox.zip && jszip-cli add extension-firefox/* -o ./extension-firefox.zip",
"pack:zip-firefox-sources": "rimraf extension-firefox-sources.zip && git archive HEAD -o extension-firefox-sources.zip",
"pack:crx": "crx pack extension -o ./extension.crx",
"pack:xpi": "cross-env WEB_EXT_ARTIFACTS_DIR=./ FIREFOX=true web-ext build --source-dir ./extension-firefox --filename extension.xpi --overwrite-dest",
"start:chromium": "web-ext run --source-dir ./extension --target=chromium",
"start:firefox": "web-ext run --source-dir ./extension-firefox --target=firefox-desktop",
"clear": "rimraf --glob extension extension.*",
"clear-firefox": "rimraf --glob extension-firefox extension-firefox.*",
"clear-safari": "rimraf --glob extension-safari extension-safari.*",
"lint": "eslint",
"lint:fix": "eslint --fix",
"test": "vitest test",
"typecheck": "vue-tsc",
"postinstall": "npx simple-git-hooks",
"knip": "knip",
"submit": "run-p submit:*",
"submit:chrome": "pnpm wxt submit --chrome-zip ./extension.zip",
"submit:firefox": "pnpm wxt submit --firefox-zip ./extension-firefox.zip --firefox-sources-zip ./extension-firefox-sources.zip"
},
"dependencies": {
"@types/md5": "^2.3.5",
"dompurify": "^3.1.5",
"md5": "^2.3.0",
"mitt": "^3.0.1",
"overlayscrollbars": "2.7.3",
"overlayscrollbars-vue": "^0.5.9",
"pinia": "^2.1.7",
"qrcode.vue": "^3.4.1",
"vue-i18n": "^9.13.1",
"vue-toastification": "2.0.0-rc.5",
"vuedraggable": "^4.1.0"
},
"devDependencies": {
"@antfu/eslint-config": "^2.21.1",
"@ffflorian/jszip-cli": "^3.6.3",
"@iconify/json": "^2.2.219",
"@iconify/vue": "^4.1.2",
"@intlify/unplugin-vue-i18n": "^4.0.0",
"@rollup/plugin-replace": "^5.0.7",
"@types/dompurify": "^3.0.5",
"@types/fs-extra": "^11.0.4",
"@types/node": "^20.14.2",
"@types/webextension-polyfill": "^0.10.7",
"@unocss/preset-attributify": "^0.61.0",
"@vitejs/plugin-vue": "^5.0.5",
"@vueuse/core": "^10.11.0",
"chokidar": "^3.6.0",
"cross-env": "^7.0.3",
"crx": "^5.0.1",
"eslint": "^9.4.0",
"eslint-plugin-format": "^0.1.2",
"eslint-plugin-simple-import-sort": "^12.1.0",
"esno": "^4.7.0",
"fs-extra": "^11.2.0",
"jsdom": "^24.1.0",
"knip": "^5.19.0",
"kolorist": "^1.8.0",
"lint-staged": "^15.2.7",
"npm-run-all": "^4.1.5",
"release-it": "^17.3.0",
"release-it-pnpm": "^4.6.1",
"rimraf": "^5.0.7",
"sass": "^1.77.5",
"simple-git-hooks": "^2.11.1",
"terser": "^5.31.1",
"tsup": "^8.1.0",
"typescript": "^5.4.5",
"unocss": "0.59.4",
"unplugin-auto-import": "^0.17.6",
"vite": "^5.3.0",
"vitest": "^1.6.0",
"vue": "^3.4.27",
"vue-tsc": "^2.0.21",
"web-ext": "^8.1.0",
"webext-bridge": "5.0.5",
"webextension-polyfill": "^0.12.0",
"wxt": "^0.18.6"
},
"simple-git-hooks": {
"pre-commit": "pnpm lint-staged"
},
"lint-staged": {
"*": "eslint --fix"
},
"webExt": {
"run": {
"keepProfileChanges": true,
"firefoxProfile": "./web-ext-profile",
"chromiumProfile": "./web-ext-profile",
"startUrl": [
"https://www.bilibili.com/"
]
}
}
}