Skip to content

Commit

Permalink
Misc changes from code review
Browse files Browse the repository at this point in the history
  • Loading branch information
Georges-Antoine Assi committed Jul 29, 2023
1 parent 1666437 commit 091be37
Show file tree
Hide file tree
Showing 10 changed files with 2,360 additions and 92 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@ Run the build as described below and then follow the instructions [here](https:/

Internally, we use `web-ext` to bundle a distribution package for the extension for Firefox. You do not need to install `web-ext`. Note that `web-ext` will generate a zip file which can also be used for the Chrome Web Store.

Then generate a build (might need to make the file executable using `chmod +x build.sh`):
Then pacakge a build (might need to make the file executable using `chmod +x package.sh`):
```
npm run generate
npm run package
```

The script does:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,5 @@
"background": {
"service_worker": "build/background.js",
"type": "module"
},
"optional_host_permissions": [
"http://*/*",
"https://*/*"
]
}
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"manifest_version": 3,
"name": "Linkding",
"version": "2.0.0",
"name": "linkding extension",
"version": "1.7.0",
"description": "Companion extension for the linkding bookmark service",
"homepage_url": "https://github.com/sissbruecker/linkding-extension/",
"icons": {
Expand All @@ -18,7 +18,7 @@
"32": "icons/button_32x32.png",
"38": "icons/button_38x38.png"
},
"default_title": "Add bookmark",
"default_title": "Add bookmark (Alt+Shift+L)",
"default_popup": "popup/index.html"
},
"commands": {
Expand All @@ -36,5 +36,9 @@
"permissions": [
"tabs",
"storage"
],
"host_permissions": [
"https://*/*",
"http://*/*"
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,5 @@
"id": "{6bc19aa2-7d91-4791-b5d4-8d84b5f3cdad}",
"strict_min_version": "109.0"
}
},
"optional_permissions": [
"http://*/*",
"https://*/*"
]
}
}
19 changes: 19 additions & 0 deletions manifests/merge.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
const jq = require("node-jq");
const fs = require("fs");
const path = require("path");

const commonManifest = JSON.parse(
fs.readFileSync("manifests/manifest.common.json", "utf8")
);
const browserManifest = JSON.parse(
fs.readFileSync(`manifests/manifest.${process.argv[2]}.json`, "utf8")
);

jq.run(".[0] * .[1]", [commonManifest, browserManifest], {
input: "json",
}).then((output) => {
if (!fs.existsSync(process.argv[3])) {
fs.mkdirSync(process.argv[3], { recursive: true });
}
fs.writeFileSync(path.join(process.argv[3], "manifest.json"), output);
});
Loading

0 comments on commit 091be37

Please sign in to comment.