From 0790214be29915f416b6df1d9f103104207487a8 Mon Sep 17 00:00:00 2001 From: nakasyou Date: Sat, 14 Oct 2023 17:56:35 +0900 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20#4=20=E3=81=AE=E4=BF=AE=E6=AD=A3?= =?UTF-8?q?=20=E3=83=93=E3=83=AB=E3=83=89=E6=99=82=E3=81=AB=E3=82=B5?= =?UTF-8?q?=E3=83=96=E3=83=87=E3=82=A3=E3=83=AC=E3=82=AF=E3=83=88=E3=83=AA?= =?UTF-8?q?`extension`=E3=82=92=E3=83=AB=E3=83=BC=E3=83=88=E3=81=AB?= =?UTF-8?q?=E3=81=97=E3=81=A6=E3=81=84=E3=81=AA=E3=81=8B=E3=81=A3=E3=81=9F?= =?UTF-8?q?=E3=81=AE=E3=81=A7=E3=80=81=E6=AD=A3=E5=B8=B8=E3=81=AB=E3=82=A4?= =?UTF-8?q?=E3=83=B3=E3=82=B9=E3=83=88=E3=83=BC=E3=83=AB=E3=81=A7=E3=81=8D?= =?UTF-8?q?=E3=81=AA=E3=81=8B=E3=81=A3=E3=81=9F=E3=83=90=E3=82=B0=E3=82=92?= =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E3=80=82=20=E3=83=95=E3=82=A1=E3=82=A4?= =?UTF-8?q?=E3=83=AB=E6=A7=8B=E9=80=A0=E3=81=AE=E5=A4=89=E6=9B=B4=E6=99=82?= =?UTF-8?q?=E3=81=8B=E3=82=89=E3=81=AE=E3=83=90=E3=82=B0=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/release.yml | 2 +- deno.lock | 4 +++- extension/manifest.json | 19 +++++++++++++------ scripts/package.ts | 2 ++ 4 files changed, 19 insertions(+), 8 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index ba66edc..06c8233 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -23,7 +23,7 @@ jobs: with: deno-version: v1.x - name: Build xpi - run: deno task package ${{ github.event.inputs.version }} + run: deno task ext:package ${{ github.event.inputs.version }} - name: Create release id: create_release uses: actions/create-release@v1.0.0 diff --git a/deno.lock b/deno.lock index b2168ab..bd4c96c 100644 --- a/deno.lock +++ b/deno.lock @@ -25,6 +25,8 @@ "https://deno.land/std@0.196.0/path/mod.ts": "f065032a7189404fdac3ad1a1551a9ac84751d2f25c431e101787846c86c79ef", "https://deno.land/std@0.196.0/path/posix.ts": "8b7c67ac338714b30c816079303d0285dd24af6b284f7ad63da5b27372a2c94d", "https://deno.land/std@0.196.0/path/separator.ts": "0fb679739d0d1d7bf45b68dacfb4ec7563597a902edbaf3c59b50d5bcadd93b1", - "https://deno.land/std@0.196.0/path/win32.ts": "4fca292f8d116fd6d62f243b8a61bd3d6835a9f0ede762ba5c01afe7c3c0aa12" + "https://deno.land/std@0.196.0/path/win32.ts": "4fca292f8d116fd6d62f243b8a61bd3d6835a9f0ede762ba5c01afe7c3c0aa12", + "https://esm.sh/fflate@0.8.0": "1f66d60a0706faacf36a93f81d341601ac55361246a598d2aa7674c375990178", + "https://esm.sh/v130/fflate@0.8.0/denonext/fflate.mjs": "2792676fe3ccd7b23597f69e7601ef914ccf1883465609ae2788d5dd75548937" } } diff --git a/extension/manifest.json b/extension/manifest.json index 4df9cdd..6493cdd 100644 --- a/extension/manifest.json +++ b/extension/manifest.json @@ -2,15 +2,22 @@ "$schema": "https://json.schemastore.org/chrome-manifest", "name": "FireCws", "manifest_version": 2, - "version": "0.1.0", "content_scripts": [ { - "matches": ["*://chrome.google.com/webstore/*"], - "js": ["content_scripts/main.js"] + "matches": [ + "*://chrome.google.com/webstore/*" + ], + "js": [ + "content_scripts/main.js" + ] }, { - "matches": ["*://*/*"], - "js": ["content_scripts/main.js"] + "matches": [ + "*://*/*" + ], + "js": [ + "content_scripts/main.js" + ] } ], "background": { @@ -34,4 +41,4 @@ "icons": { "256": "./assets/firecrx-256x256.png" } -} +} \ No newline at end of file diff --git a/scripts/package.ts b/scripts/package.ts index 0e26026..59296d4 100644 --- a/scripts/package.ts +++ b/scripts/package.ts @@ -13,7 +13,9 @@ for await (const entry of fs.walk("./extension")) { continue } const path = entry.path.replace("\\", "/") // Windows to Linux + .replace(/^extension\//, '') // サブディレクトリ`extension`をルートに files[path] = await Deno.readFile(entry.path) } +console.log(files) await fs.emptyDir("./dist") await Deno.writeFile("./dist/firefox.xpi", fflate.zipSync(files))