Add Firefox dev extension shell
This commit is contained in:
1 parent
cb4373d05b
commit
427d97da77
6 files changed
+1478
-1
No files matched your search
@@ -8,6 +8,7 @@
|
||||
|
||||
# misc
|
||||
*.local
|
||||
web-ext-artifacts/
|
||||
/.pnp*
|
||||
/.eslintcache
|
||||
/coverage/
|
||||
|
||||
@@ -24,6 +24,23 @@ You will need the following things properly installed on your computer.
|
||||
- Visit your app at [http://localhost:4200](http://localhost:4200).
|
||||
- Visit your tests at [http://localhost:4200/tests](http://localhost:4200/tests).
|
||||
|
||||
### Firefox dev extension
|
||||
|
||||
The `extension/` directory is a temporary MV3 shell that overrides the Firefox
|
||||
new-tab page with an iframe pointing at the dev server.
|
||||
|
||||
- `pnpm ext:dev` starts the dev server and launches Firefox via `web-ext`
|
||||
(dedicated temporary profile; auto-reloads the add-on on changes). The new tab
|
||||
renders the dashboard with HMR.
|
||||
- Or run `pnpm start`, then load the extension manually:
|
||||
`about:debugging#/runtime/this-firefox` → **Load Temporary Add-on…** → select
|
||||
`extension/manifest.json`. Temporary add-ons are removed when Firefox closes.
|
||||
- `pnpm ext:lint` validates the extension manifest.
|
||||
|
||||
Because the iframe is a `localhost` document, requests are still subject to CORS
|
||||
and the extension's host permissions are not exercised. See the Discourse
|
||||
integration notes for the follow-up on privileged cross-origin requests.
|
||||
|
||||
### Code Generators
|
||||
|
||||
Make use of the many generators for code, try `pnpm ember help generate` for more details
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
{
|
||||
"manifest_version": 3,
|
||||
"name": "Dashtab (dev)",
|
||||
"version": "0.0.0",
|
||||
"description": "Dashtab new-tab dashboard — development shell.",
|
||||
"browser_specific_settings": {
|
||||
"gecko": {
|
||||
"id": "dashtab-dev@local",
|
||||
"strict_min_version": "142.0",
|
||||
"data_collection_permissions": {
|
||||
"required": ["none"]
|
||||
}
|
||||
}
|
||||
},
|
||||
"chrome_url_overrides": {
|
||||
"newtab": "newtab.html"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<title>Dashtab</title>
|
||||
<style>
|
||||
html,
|
||||
body {
|
||||
margin: 0;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
iframe {
|
||||
display: block;
|
||||
border: 0;
|
||||
width: 100vw;
|
||||
height: 100vh;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<iframe src="http://localhost:4200/" title="Dashtab"></iframe>
|
||||
</body>
|
||||
</html>
|
||||
+6
-1
@@ -12,6 +12,9 @@
|
||||
},
|
||||
"scripts": {
|
||||
"build": "vite build",
|
||||
"ext:dev": "concurrently -k \"pnpm start\" \"wait-on tcp:4200 && pnpm ext:serve\"",
|
||||
"ext:lint": "web-ext lint --source-dir=extension",
|
||||
"ext:serve": "web-ext run --source-dir=extension --start-url about:newtab",
|
||||
"format": "prettier . --cache --write",
|
||||
"lint": "concurrently \"pnpm:lint:*(!fix)\" --names \"lint:\" --prefixColors auto",
|
||||
"lint:css": "stylelint \"**/*.css\"",
|
||||
@@ -82,7 +85,9 @@
|
||||
"tailwindcss": "^4.3.3",
|
||||
"testem": "^3.21.2",
|
||||
"tracked-built-ins": "^4.1.2",
|
||||
"vite": "^8.3.1"
|
||||
"vite": "^8.3.1",
|
||||
"wait-on": "^9.5.1",
|
||||
"web-ext": "^10.7.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 22.13"
|
||||
|
||||
Generated
+1412
File diff suppressed because it is too large.
Load diff
Reference in new issue
Block a user