Skip to content

Commit

Permalink
Merge pull request #6 from nakasyou/fix-build-bug
Browse files Browse the repository at this point in the history
ビルドしたxpiが正しくインストールできないバグの修正 (#4)
  • Loading branch information
nakasyou authored Oct 14, 2023
2 parents a658805 + 0790214 commit db3da4f
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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/[email protected]
Expand Down
4 changes: 3 additions & 1 deletion deno.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 13 additions & 6 deletions extension/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand All @@ -34,4 +41,4 @@
"icons": {
"256": "./assets/firecrx-256x256.png"
}
}
}
2 changes: 2 additions & 0 deletions scripts/package.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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))

0 comments on commit db3da4f

Please sign in to comment.