create-addfox-app 0.1.1 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +18 -18
- package/dist/cli.js +77 -5
- package/package.json +3 -6
- package/templates/template-preact-js/addfox.config.js +27 -27
- package/templates/template-preact-js/app/background/index.js +8 -8
- package/templates/template-preact-js/app/content/index.js +1 -1
- package/templates/template-preact-js/app/options/App.jsx +5 -5
- package/templates/template-preact-js/app/options/index.jsx +5 -5
- package/templates/template-preact-js/app/popup/index.jsx +5 -5
- package/templates/template-preact-js/app/sidepanel/App.jsx +5 -5
- package/templates/template-preact-js/app/sidepanel/index.jsx +5 -5
- package/templates/template-preact-js/package.json +3 -3
- package/templates/template-preact-ts/addfox.config.ts +27 -27
- package/templates/template-preact-ts/app/background/index.ts +8 -8
- package/templates/template-preact-ts/app/content/index.ts +1 -1
- package/templates/template-preact-ts/app/options/App.tsx +5 -5
- package/templates/template-preact-ts/app/options/index.tsx +5 -5
- package/templates/template-preact-ts/app/popup/index.tsx +5 -5
- package/templates/template-preact-ts/app/sidepanel/App.tsx +5 -5
- package/templates/template-preact-ts/app/sidepanel/index.tsx +5 -5
- package/templates/template-preact-ts/package.json +3 -3
- package/templates/template-react-js/addfox.config.js +27 -27
- package/templates/template-react-js/app/background/index.js +8 -8
- package/templates/template-react-js/app/content/index.js +1 -1
- package/templates/template-react-js/app/options/App.jsx +3 -3
- package/templates/template-react-js/app/options/index.jsx +5 -5
- package/templates/template-react-js/app/popup/index.jsx +5 -5
- package/templates/template-react-js/app/sidepanel/App.jsx +3 -3
- package/templates/template-react-js/app/sidepanel/index.jsx +5 -5
- package/templates/template-react-js/package.json +3 -3
- package/templates/template-react-ts/addfox.config.ts +27 -27
- package/templates/template-react-ts/app/background/index.ts +8 -8
- package/templates/template-react-ts/app/content/index.ts +1 -1
- package/templates/template-react-ts/app/options/App.tsx +3 -3
- package/templates/template-react-ts/app/options/index.tsx +5 -5
- package/templates/template-react-ts/app/popup/index.tsx +5 -5
- package/templates/template-react-ts/app/sidepanel/App.tsx +3 -3
- package/templates/template-react-ts/app/sidepanel/index.tsx +5 -5
- package/templates/template-react-ts/package.json +3 -3
- package/templates/template-solid-js/addfox.config.js +28 -28
- package/templates/template-solid-js/app/background/index.js +8 -8
- package/templates/template-solid-js/app/content/index.js +1 -1
- package/templates/template-solid-js/app/options/App.jsx +3 -3
- package/templates/template-solid-js/app/options/index.jsx +5 -5
- package/templates/template-solid-js/app/popup/index.jsx +5 -5
- package/templates/template-solid-js/app/sidepanel/App.jsx +3 -3
- package/templates/template-solid-js/app/sidepanel/index.jsx +5 -5
- package/templates/template-solid-js/package.json +4 -4
- package/templates/template-solid-ts/addfox.config.ts +28 -28
- package/templates/template-solid-ts/app/background/index.ts +8 -8
- package/templates/template-solid-ts/app/content/index.ts +1 -1
- package/templates/template-solid-ts/app/options/App.tsx +3 -3
- package/templates/template-solid-ts/app/options/index.tsx +5 -5
- package/templates/template-solid-ts/app/popup/index.tsx +5 -5
- package/templates/template-solid-ts/app/sidepanel/App.tsx +3 -3
- package/templates/template-solid-ts/app/sidepanel/index.tsx +5 -5
- package/templates/template-solid-ts/package.json +4 -4
- package/templates/template-svelte-js/addfox.config.js +27 -27
- package/templates/template-svelte-js/app/background/index.js +8 -8
- package/templates/template-svelte-js/app/content/index.js +1 -1
- package/templates/template-svelte-js/app/options/App.svelte +4 -4
- package/templates/template-svelte-js/app/options/index.js +4 -4
- package/templates/template-svelte-js/app/popup/index.js +4 -4
- package/templates/template-svelte-js/app/sidepanel/App.svelte +4 -4
- package/templates/template-svelte-js/app/sidepanel/index.js +4 -4
- package/templates/template-svelte-js/package.json +3 -3
- package/templates/template-svelte-ts/addfox.config.ts +27 -27
- package/templates/template-svelte-ts/app/background/index.ts +8 -8
- package/templates/template-svelte-ts/app/content/index.ts +1 -1
- package/templates/template-svelte-ts/app/options/App.svelte +4 -4
- package/templates/template-svelte-ts/app/options/index.ts +4 -4
- package/templates/template-svelte-ts/app/popup/index.ts +4 -4
- package/templates/template-svelte-ts/app/sidepanel/App.svelte +4 -4
- package/templates/template-svelte-ts/app/sidepanel/index.ts +4 -4
- package/templates/template-svelte-ts/package.json +3 -3
- package/templates/template-vanilla-js/addfox.config.js +25 -25
- package/templates/template-vanilla-js/app/background/index.js +8 -8
- package/templates/template-vanilla-js/app/content/index.js +1 -1
- package/templates/template-vanilla-js/app/options/index.js +2 -2
- package/templates/template-vanilla-js/app/sidepanel/index.js +2 -2
- package/templates/template-vanilla-js/package.json +1 -1
- package/templates/template-vanilla-ts/addfox.config.ts +25 -25
- package/templates/template-vanilla-ts/app/background/index.ts +8 -8
- package/templates/template-vanilla-ts/app/content/index.ts +1 -1
- package/templates/template-vanilla-ts/app/options/index.ts +2 -2
- package/templates/template-vanilla-ts/app/sidepanel/index.ts +2 -2
- package/templates/template-vanilla-ts/package.json +1 -1
- package/templates/template-vanilla-ts/tsconfig.json +16 -16
- package/templates/template-vue-js/addfox.config.js +27 -27
- package/templates/template-vue-js/app/background/index.js +8 -8
- package/templates/template-vue-js/app/content/index.js +1 -1
- package/templates/template-vue-js/app/options/App.vue +6 -6
- package/templates/template-vue-js/app/options/index.js +5 -5
- package/templates/template-vue-js/app/popup/index.js +5 -5
- package/templates/template-vue-js/app/sidepanel/App.vue +6 -6
- package/templates/template-vue-js/app/sidepanel/index.js +5 -5
- package/templates/template-vue-js/package.json +3 -3
- package/templates/template-vue-ts/addfox.config.ts +27 -27
- package/templates/template-vue-ts/app/background/index.ts +8 -8
- package/templates/template-vue-ts/app/content/index.ts +1 -1
- package/templates/template-vue-ts/app/options/App.vue +6 -6
- package/templates/template-vue-ts/app/options/index.ts +5 -5
- package/templates/template-vue-ts/app/popup/index.ts +5 -5
- package/templates/template-vue-ts/app/sidepanel/App.vue +6 -6
- package/templates/template-vue-ts/app/sidepanel/index.ts +5 -5
- package/templates/template-vue-ts/package.json +3 -3
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
import { defineConfig } from "addfox";
|
|
2
|
-
import { pluginSvelte } from "@rsbuild/plugin-svelte";
|
|
3
|
-
|
|
4
|
-
const manifest = {
|
|
5
|
-
name: "My Extension",
|
|
6
|
-
version: "1.0.0",
|
|
7
|
-
manifest_version: 3,
|
|
8
|
-
description: "Browser extension built with addfox",
|
|
9
|
-
permissions: ["activeTab"],
|
|
10
|
-
icons: {
|
|
11
|
-
"16": "icons/icon_128.png",
|
|
12
|
-
"48": "icons/icon_128.png",
|
|
13
|
-
"128": "icons/icon_128.png",
|
|
14
|
-
},
|
|
15
|
-
action: {
|
|
16
|
-
default_icon: {
|
|
17
|
-
"16": "icons/icon_128.png",
|
|
18
|
-
"48": "icons/icon_128.png",
|
|
19
|
-
"128": "icons/icon_128.png",
|
|
20
|
-
},
|
|
21
|
-
},
|
|
22
|
-
};
|
|
23
|
-
|
|
24
|
-
export default defineConfig({
|
|
25
|
-
manifest: { chromium: manifest, firefox: { ...manifest } },
|
|
26
|
-
plugins: [pluginSvelte()],
|
|
27
|
-
});
|
|
1
|
+
import { defineConfig } from "addfox";
|
|
2
|
+
import { pluginSvelte } from "@rsbuild/plugin-svelte";
|
|
3
|
+
|
|
4
|
+
const manifest = {
|
|
5
|
+
name: "My Extension",
|
|
6
|
+
version: "1.0.0",
|
|
7
|
+
manifest_version: 3,
|
|
8
|
+
description: "Browser extension built with addfox",
|
|
9
|
+
permissions: ["activeTab"],
|
|
10
|
+
icons: {
|
|
11
|
+
"16": "icons/icon_128.png",
|
|
12
|
+
"48": "icons/icon_128.png",
|
|
13
|
+
"128": "icons/icon_128.png",
|
|
14
|
+
},
|
|
15
|
+
action: {
|
|
16
|
+
default_icon: {
|
|
17
|
+
"16": "icons/icon_128.png",
|
|
18
|
+
"48": "icons/icon_128.png",
|
|
19
|
+
"128": "icons/icon_128.png",
|
|
20
|
+
},
|
|
21
|
+
},
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
export default defineConfig({
|
|
25
|
+
manifest: { chromium: manifest, firefox: { ...manifest } },
|
|
26
|
+
plugins: [pluginSvelte()],
|
|
27
|
+
});
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
function openWelcomePage() {
|
|
2
|
-
chrome.tabs.create({ url: chrome.runtime.getURL("welcome.html") });
|
|
3
|
-
}
|
|
4
|
-
|
|
5
|
-
chrome.runtime.onInstalled.addListener((details) => {
|
|
6
|
-
if (details.reason === "install" || details.reason === "update") openWelcomePage();
|
|
7
|
-
console.log("Extension installed");
|
|
8
|
-
});
|
|
1
|
+
function openWelcomePage() {
|
|
2
|
+
chrome.tabs.create({ url: chrome.runtime.getURL("welcome.html") });
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
chrome.runtime.onInstalled.addListener((details) => {
|
|
6
|
+
if (details.reason === "install" || details.reason === "update") openWelcomePage();
|
|
7
|
+
console.log("Extension installed");
|
|
8
|
+
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
console.log("Content script loaded");
|
|
1
|
+
console.log("Content script loaded");
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<script>
|
|
2
|
-
</script>
|
|
3
|
-
|
|
4
|
-
<div>Hello from Svelte</div>
|
|
1
|
+
<script>
|
|
2
|
+
</script>
|
|
3
|
+
|
|
4
|
+
<div>Hello from Svelte</div>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import App from "./App.svelte";
|
|
2
|
-
|
|
3
|
-
const target = document.getElementById("root");
|
|
4
|
-
if (target) new App({ target });
|
|
1
|
+
import App from "./App.svelte";
|
|
2
|
+
|
|
3
|
+
const target = document.getElementById("root");
|
|
4
|
+
if (target) new App({ target });
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import App from "./App.svelte";
|
|
2
|
-
|
|
3
|
-
const target = document.getElementById("root");
|
|
4
|
-
if (target) new App({ target });
|
|
1
|
+
import App from "./App.svelte";
|
|
2
|
+
|
|
3
|
+
const target = document.getElementById("root");
|
|
4
|
+
if (target) new App({ target });
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<script>
|
|
2
|
-
</script>
|
|
3
|
-
|
|
4
|
-
<div>Hello from Svelte</div>
|
|
1
|
+
<script>
|
|
2
|
+
</script>
|
|
3
|
+
|
|
4
|
+
<div>Hello from Svelte</div>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import App from "./App.svelte";
|
|
2
|
-
|
|
3
|
-
const target = document.getElementById("root");
|
|
4
|
-
if (target) new App({ target });
|
|
1
|
+
import App from "./App.svelte";
|
|
2
|
+
|
|
3
|
+
const target = document.getElementById("root");
|
|
4
|
+
if (target) new App({ target });
|
|
@@ -8,12 +8,12 @@
|
|
|
8
8
|
"build": "addfox build"
|
|
9
9
|
},
|
|
10
10
|
"dependencies": {
|
|
11
|
-
"@addfox/utils": "
|
|
11
|
+
"@addfox/utils": "0.1.1",
|
|
12
12
|
"svelte": "^5.54.1"
|
|
13
13
|
},
|
|
14
14
|
"devDependencies": {
|
|
15
|
-
"addfox": "
|
|
16
|
-
"@rsbuild/plugin-svelte": "
|
|
15
|
+
"addfox": "0.1.1",
|
|
16
|
+
"@rsbuild/plugin-svelte": "1.1.1",
|
|
17
17
|
"typescript": "^5.9.3",
|
|
18
18
|
"@types/chrome": "^0.1.38"
|
|
19
19
|
}
|
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
import { defineConfig } from "addfox";
|
|
2
|
-
|
|
3
|
-
const manifest = {
|
|
4
|
-
name: "My Extension",
|
|
5
|
-
version: "1.0.0",
|
|
6
|
-
manifest_version: 3,
|
|
7
|
-
description: "Browser extension built with addfox",
|
|
8
|
-
permissions: ["activeTab"],
|
|
9
|
-
icons: {
|
|
10
|
-
"16": "icons/icon_128.png",
|
|
11
|
-
"48": "icons/icon_128.png",
|
|
12
|
-
"128": "icons/icon_128.png",
|
|
13
|
-
},
|
|
14
|
-
action: {
|
|
15
|
-
default_icon: {
|
|
16
|
-
"16": "icons/icon_128.png",
|
|
17
|
-
"48": "icons/icon_128.png",
|
|
18
|
-
"128": "icons/icon_128.png",
|
|
19
|
-
},
|
|
20
|
-
},
|
|
21
|
-
};
|
|
22
|
-
|
|
23
|
-
export default defineConfig({
|
|
24
|
-
manifest: { chromium: manifest, firefox: { ...manifest } },
|
|
25
|
-
});
|
|
1
|
+
import { defineConfig } from "addfox";
|
|
2
|
+
|
|
3
|
+
const manifest = {
|
|
4
|
+
name: "My Extension",
|
|
5
|
+
version: "1.0.0",
|
|
6
|
+
manifest_version: 3,
|
|
7
|
+
description: "Browser extension built with addfox",
|
|
8
|
+
permissions: ["activeTab"],
|
|
9
|
+
icons: {
|
|
10
|
+
"16": "icons/icon_128.png",
|
|
11
|
+
"48": "icons/icon_128.png",
|
|
12
|
+
"128": "icons/icon_128.png",
|
|
13
|
+
},
|
|
14
|
+
action: {
|
|
15
|
+
default_icon: {
|
|
16
|
+
"16": "icons/icon_128.png",
|
|
17
|
+
"48": "icons/icon_128.png",
|
|
18
|
+
"128": "icons/icon_128.png",
|
|
19
|
+
},
|
|
20
|
+
},
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
export default defineConfig({
|
|
24
|
+
manifest: { chromium: manifest, firefox: { ...manifest } },
|
|
25
|
+
});
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
function openWelcomePage() {
|
|
2
|
-
chrome.tabs.create({ url: chrome.runtime.getURL("welcome.html") });
|
|
3
|
-
}
|
|
4
|
-
|
|
5
|
-
chrome.runtime.onInstalled.addListener((details) => {
|
|
6
|
-
if (details.reason === "install" || details.reason === "update") openWelcomePage();
|
|
7
|
-
console.log("Extension installed");
|
|
8
|
-
});
|
|
1
|
+
function openWelcomePage() {
|
|
2
|
+
chrome.tabs.create({ url: chrome.runtime.getURL("welcome.html") });
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
chrome.runtime.onInstalled.addListener((details) => {
|
|
6
|
+
if (details.reason === "install" || details.reason === "update") openWelcomePage();
|
|
7
|
+
console.log("Extension installed");
|
|
8
|
+
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
console.log("Content script loaded");
|
|
1
|
+
console.log("Content script loaded");
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const root = document.getElementById("root");
|
|
2
|
-
if (root) root.textContent = "Options";
|
|
1
|
+
const root = document.getElementById("root");
|
|
2
|
+
if (root) root.textContent = "Options";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const root = document.getElementById("root");
|
|
2
|
-
if (root) root.textContent = "Side panel";
|
|
1
|
+
const root = document.getElementById("root");
|
|
2
|
+
if (root) root.textContent = "Side panel";
|
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
import { defineConfig } from "addfox";
|
|
2
|
-
|
|
3
|
-
const manifest = {
|
|
4
|
-
name: "My Extension",
|
|
5
|
-
version: "1.0.0",
|
|
6
|
-
manifest_version: 3,
|
|
7
|
-
description: "Browser extension built with addfox",
|
|
8
|
-
permissions: ["activeTab"],
|
|
9
|
-
icons: {
|
|
10
|
-
"16": "icons/icon_128.png",
|
|
11
|
-
"48": "icons/icon_128.png",
|
|
12
|
-
"128": "icons/icon_128.png",
|
|
13
|
-
},
|
|
14
|
-
action: {
|
|
15
|
-
default_icon: {
|
|
16
|
-
"16": "icons/icon_128.png",
|
|
17
|
-
"48": "icons/icon_128.png",
|
|
18
|
-
"128": "icons/icon_128.png",
|
|
19
|
-
},
|
|
20
|
-
},
|
|
21
|
-
};
|
|
22
|
-
|
|
23
|
-
export default defineConfig({
|
|
24
|
-
manifest: { chromium: manifest, firefox: { ...manifest } },
|
|
25
|
-
});
|
|
1
|
+
import { defineConfig } from "addfox";
|
|
2
|
+
|
|
3
|
+
const manifest = {
|
|
4
|
+
name: "My Extension",
|
|
5
|
+
version: "1.0.0",
|
|
6
|
+
manifest_version: 3,
|
|
7
|
+
description: "Browser extension built with addfox",
|
|
8
|
+
permissions: ["activeTab"],
|
|
9
|
+
icons: {
|
|
10
|
+
"16": "icons/icon_128.png",
|
|
11
|
+
"48": "icons/icon_128.png",
|
|
12
|
+
"128": "icons/icon_128.png",
|
|
13
|
+
},
|
|
14
|
+
action: {
|
|
15
|
+
default_icon: {
|
|
16
|
+
"16": "icons/icon_128.png",
|
|
17
|
+
"48": "icons/icon_128.png",
|
|
18
|
+
"128": "icons/icon_128.png",
|
|
19
|
+
},
|
|
20
|
+
},
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
export default defineConfig({
|
|
24
|
+
manifest: { chromium: manifest, firefox: { ...manifest } },
|
|
25
|
+
});
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
function openWelcomePage() {
|
|
2
|
-
chrome.tabs.create({ url: chrome.runtime.getURL("welcome.html") });
|
|
3
|
-
}
|
|
4
|
-
|
|
5
|
-
chrome.runtime.onInstalled.addListener((details) => {
|
|
6
|
-
if (details.reason === "install" || details.reason === "update") openWelcomePage();
|
|
7
|
-
console.log("Extension installed");
|
|
8
|
-
});
|
|
1
|
+
function openWelcomePage() {
|
|
2
|
+
chrome.tabs.create({ url: chrome.runtime.getURL("welcome.html") });
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
chrome.runtime.onInstalled.addListener((details) => {
|
|
6
|
+
if (details.reason === "install" || details.reason === "update") openWelcomePage();
|
|
7
|
+
console.log("Extension installed");
|
|
8
|
+
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
console.log("Content script loaded");
|
|
1
|
+
console.log("Content script loaded");
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const root = document.getElementById("root");
|
|
2
|
-
if (root) root.textContent = "Options";
|
|
1
|
+
const root = document.getElementById("root");
|
|
2
|
+
if (root) root.textContent = "Options";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const root = document.getElementById("root");
|
|
2
|
-
if (root) root.textContent = "Side panel";
|
|
1
|
+
const root = document.getElementById("root");
|
|
2
|
+
if (root) root.textContent = "Side panel";
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
{
|
|
2
|
-
"compilerOptions": {
|
|
3
|
-
"target": "ES2020",
|
|
4
|
-
"module": "ESNext",
|
|
5
|
-
"moduleResolution": "bundler",
|
|
6
|
-
"strict": true,
|
|
7
|
-
"jsx": "react-jsx",
|
|
8
|
-
"resolveJsonModule": true,
|
|
9
|
-
"isolatedModules": true,
|
|
10
|
-
"noEmit": true,
|
|
11
|
-
"skipLibCheck": true,
|
|
12
|
-
"types": []
|
|
13
|
-
},
|
|
14
|
-
"include": [
|
|
15
|
-
"app"
|
|
16
|
-
]
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"target": "ES2020",
|
|
4
|
+
"module": "ESNext",
|
|
5
|
+
"moduleResolution": "bundler",
|
|
6
|
+
"strict": true,
|
|
7
|
+
"jsx": "react-jsx",
|
|
8
|
+
"resolveJsonModule": true,
|
|
9
|
+
"isolatedModules": true,
|
|
10
|
+
"noEmit": true,
|
|
11
|
+
"skipLibCheck": true,
|
|
12
|
+
"types": []
|
|
13
|
+
},
|
|
14
|
+
"include": [
|
|
15
|
+
"app"
|
|
16
|
+
]
|
|
17
17
|
}
|
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
import { defineConfig } from "addfox";
|
|
2
|
-
import { pluginVue } from "@rsbuild/plugin-vue";
|
|
3
|
-
|
|
4
|
-
const manifest = {
|
|
5
|
-
name: "My Extension",
|
|
6
|
-
version: "1.0.0",
|
|
7
|
-
manifest_version: 3,
|
|
8
|
-
description: "Browser extension built with addfox",
|
|
9
|
-
permissions: ["activeTab"],
|
|
10
|
-
icons: {
|
|
11
|
-
"16": "icons/icon_128.png",
|
|
12
|
-
"48": "icons/icon_128.png",
|
|
13
|
-
"128": "icons/icon_128.png",
|
|
14
|
-
},
|
|
15
|
-
action: {
|
|
16
|
-
default_icon: {
|
|
17
|
-
"16": "icons/icon_128.png",
|
|
18
|
-
"48": "icons/icon_128.png",
|
|
19
|
-
"128": "icons/icon_128.png",
|
|
20
|
-
},
|
|
21
|
-
},
|
|
22
|
-
};
|
|
23
|
-
|
|
24
|
-
export default defineConfig({
|
|
25
|
-
manifest: { chromium: manifest, firefox: { ...manifest } },
|
|
26
|
-
plugins: [pluginVue()],
|
|
27
|
-
});
|
|
1
|
+
import { defineConfig } from "addfox";
|
|
2
|
+
import { pluginVue } from "@rsbuild/plugin-vue";
|
|
3
|
+
|
|
4
|
+
const manifest = {
|
|
5
|
+
name: "My Extension",
|
|
6
|
+
version: "1.0.0",
|
|
7
|
+
manifest_version: 3,
|
|
8
|
+
description: "Browser extension built with addfox",
|
|
9
|
+
permissions: ["activeTab"],
|
|
10
|
+
icons: {
|
|
11
|
+
"16": "icons/icon_128.png",
|
|
12
|
+
"48": "icons/icon_128.png",
|
|
13
|
+
"128": "icons/icon_128.png",
|
|
14
|
+
},
|
|
15
|
+
action: {
|
|
16
|
+
default_icon: {
|
|
17
|
+
"16": "icons/icon_128.png",
|
|
18
|
+
"48": "icons/icon_128.png",
|
|
19
|
+
"128": "icons/icon_128.png",
|
|
20
|
+
},
|
|
21
|
+
},
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
export default defineConfig({
|
|
25
|
+
manifest: { chromium: manifest, firefox: { ...manifest } },
|
|
26
|
+
plugins: [pluginVue()],
|
|
27
|
+
});
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
function openWelcomePage() {
|
|
2
|
-
chrome.tabs.create({ url: chrome.runtime.getURL("welcome.html") });
|
|
3
|
-
}
|
|
4
|
-
|
|
5
|
-
chrome.runtime.onInstalled.addListener((details) => {
|
|
6
|
-
if (details.reason === "install" || details.reason === "update") openWelcomePage();
|
|
7
|
-
console.log("Extension installed");
|
|
8
|
-
});
|
|
1
|
+
function openWelcomePage() {
|
|
2
|
+
chrome.tabs.create({ url: chrome.runtime.getURL("welcome.html") });
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
chrome.runtime.onInstalled.addListener((details) => {
|
|
6
|
+
if (details.reason === "install" || details.reason === "update") openWelcomePage();
|
|
7
|
+
console.log("Extension installed");
|
|
8
|
+
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
console.log("Content script loaded");
|
|
1
|
+
console.log("Content script loaded");
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div>Hello from Vue</div>
|
|
3
|
-
</template>
|
|
4
|
-
|
|
5
|
-
<script setup>
|
|
6
|
-
</script>
|
|
1
|
+
<template>
|
|
2
|
+
<div>Hello from Vue</div>
|
|
3
|
+
</template>
|
|
4
|
+
|
|
5
|
+
<script setup>
|
|
6
|
+
</script>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { createApp } from "vue";
|
|
2
|
-
import App from "./App.vue";
|
|
3
|
-
|
|
4
|
-
const root = document.getElementById("root");
|
|
5
|
-
if (root) createApp(App).mount(root);
|
|
1
|
+
import { createApp } from "vue";
|
|
2
|
+
import App from "./App.vue";
|
|
3
|
+
|
|
4
|
+
const root = document.getElementById("root");
|
|
5
|
+
if (root) createApp(App).mount(root);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { createApp } from "vue";
|
|
2
|
-
import App from "./App.vue";
|
|
3
|
-
|
|
4
|
-
const root = document.getElementById("root");
|
|
5
|
-
if (root) createApp(App).mount(root);
|
|
1
|
+
import { createApp } from "vue";
|
|
2
|
+
import App from "./App.vue";
|
|
3
|
+
|
|
4
|
+
const root = document.getElementById("root");
|
|
5
|
+
if (root) createApp(App).mount(root);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div>Hello from Vue</div>
|
|
3
|
-
</template>
|
|
4
|
-
|
|
5
|
-
<script setup>
|
|
6
|
-
</script>
|
|
1
|
+
<template>
|
|
2
|
+
<div>Hello from Vue</div>
|
|
3
|
+
</template>
|
|
4
|
+
|
|
5
|
+
<script setup>
|
|
6
|
+
</script>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { createApp } from "vue";
|
|
2
|
-
import App from "./App.vue";
|
|
3
|
-
|
|
4
|
-
const root = document.getElementById("root");
|
|
5
|
-
if (root) createApp(App).mount(root);
|
|
1
|
+
import { createApp } from "vue";
|
|
2
|
+
import App from "./App.vue";
|
|
3
|
+
|
|
4
|
+
const root = document.getElementById("root");
|
|
5
|
+
if (root) createApp(App).mount(root);
|
|
@@ -8,11 +8,11 @@
|
|
|
8
8
|
"build": "addfox build"
|
|
9
9
|
},
|
|
10
10
|
"dependencies": {
|
|
11
|
-
"@addfox/utils": "
|
|
11
|
+
"@addfox/utils": "0.1.1",
|
|
12
12
|
"vue": "^3.5.30"
|
|
13
13
|
},
|
|
14
14
|
"devDependencies": {
|
|
15
|
-
"addfox": "
|
|
16
|
-
"@rsbuild/plugin-vue": "^1.2.
|
|
15
|
+
"addfox": "0.1.1",
|
|
16
|
+
"@rsbuild/plugin-vue": "^1.2.8"
|
|
17
17
|
}
|
|
18
18
|
}
|
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
import { defineConfig } from "addfox";
|
|
2
|
-
import { pluginVue } from "@rsbuild/plugin-vue";
|
|
3
|
-
|
|
4
|
-
const manifest = {
|
|
5
|
-
name: "My Extension",
|
|
6
|
-
version: "1.0.0",
|
|
7
|
-
manifest_version: 3,
|
|
8
|
-
description: "Browser extension built with addfox",
|
|
9
|
-
permissions: ["activeTab"],
|
|
10
|
-
icons: {
|
|
11
|
-
"16": "icons/icon_128.png",
|
|
12
|
-
"48": "icons/icon_128.png",
|
|
13
|
-
"128": "icons/icon_128.png",
|
|
14
|
-
},
|
|
15
|
-
action: {
|
|
16
|
-
default_icon: {
|
|
17
|
-
"16": "icons/icon_128.png",
|
|
18
|
-
"48": "icons/icon_128.png",
|
|
19
|
-
"128": "icons/icon_128.png",
|
|
20
|
-
},
|
|
21
|
-
},
|
|
22
|
-
};
|
|
23
|
-
|
|
24
|
-
export default defineConfig({
|
|
25
|
-
manifest: { chromium: manifest, firefox: { ...manifest } },
|
|
26
|
-
plugins: [pluginVue()],
|
|
27
|
-
});
|
|
1
|
+
import { defineConfig } from "addfox";
|
|
2
|
+
import { pluginVue } from "@rsbuild/plugin-vue";
|
|
3
|
+
|
|
4
|
+
const manifest = {
|
|
5
|
+
name: "My Extension",
|
|
6
|
+
version: "1.0.0",
|
|
7
|
+
manifest_version: 3,
|
|
8
|
+
description: "Browser extension built with addfox",
|
|
9
|
+
permissions: ["activeTab"],
|
|
10
|
+
icons: {
|
|
11
|
+
"16": "icons/icon_128.png",
|
|
12
|
+
"48": "icons/icon_128.png",
|
|
13
|
+
"128": "icons/icon_128.png",
|
|
14
|
+
},
|
|
15
|
+
action: {
|
|
16
|
+
default_icon: {
|
|
17
|
+
"16": "icons/icon_128.png",
|
|
18
|
+
"48": "icons/icon_128.png",
|
|
19
|
+
"128": "icons/icon_128.png",
|
|
20
|
+
},
|
|
21
|
+
},
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
export default defineConfig({
|
|
25
|
+
manifest: { chromium: manifest, firefox: { ...manifest } },
|
|
26
|
+
plugins: [pluginVue()],
|
|
27
|
+
});
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
function openWelcomePage() {
|
|
2
|
-
chrome.tabs.create({ url: chrome.runtime.getURL("welcome.html") });
|
|
3
|
-
}
|
|
4
|
-
|
|
5
|
-
chrome.runtime.onInstalled.addListener((details) => {
|
|
6
|
-
if (details.reason === "install" || details.reason === "update") openWelcomePage();
|
|
7
|
-
console.log("Extension installed");
|
|
8
|
-
});
|
|
1
|
+
function openWelcomePage() {
|
|
2
|
+
chrome.tabs.create({ url: chrome.runtime.getURL("welcome.html") });
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
chrome.runtime.onInstalled.addListener((details) => {
|
|
6
|
+
if (details.reason === "install" || details.reason === "update") openWelcomePage();
|
|
7
|
+
console.log("Extension installed");
|
|
8
|
+
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
console.log("Content script loaded");
|
|
1
|
+
console.log("Content script loaded");
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div>Hello from Vue</div>
|
|
3
|
-
</template>
|
|
4
|
-
|
|
5
|
-
<script setup>
|
|
6
|
-
</script>
|
|
1
|
+
<template>
|
|
2
|
+
<div>Hello from Vue</div>
|
|
3
|
+
</template>
|
|
4
|
+
|
|
5
|
+
<script setup>
|
|
6
|
+
</script>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { createApp } from "vue";
|
|
2
|
-
import App from "./App.vue";
|
|
3
|
-
|
|
4
|
-
const root = document.getElementById("root");
|
|
5
|
-
if (root) createApp(App).mount(root);
|
|
1
|
+
import { createApp } from "vue";
|
|
2
|
+
import App from "./App.vue";
|
|
3
|
+
|
|
4
|
+
const root = document.getElementById("root");
|
|
5
|
+
if (root) createApp(App).mount(root);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { createApp } from "vue";
|
|
2
|
-
import App from "./App.vue";
|
|
3
|
-
|
|
4
|
-
const root = document.getElementById("root");
|
|
5
|
-
if (root) createApp(App).mount(root);
|
|
1
|
+
import { createApp } from "vue";
|
|
2
|
+
import App from "./App.vue";
|
|
3
|
+
|
|
4
|
+
const root = document.getElementById("root");
|
|
5
|
+
if (root) createApp(App).mount(root);
|